Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bugs in the EXAMPLES.md's code snippets #994

Merged
merged 4 commits into from
Jun 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const auth = new AuthenticationClient({
clientSecret: '{YOUR_CLIENT_SECRET}',
});
const { data: user } = await auth.database.signUp({
user: '{USER_EMAIL}',
email: '{USER_EMAIL}',
password: '{USER_PASSWORD}',
connection: 'Username-Password-Authentication',
});
Expand Down Expand Up @@ -158,7 +158,7 @@ while (true) {
}
```

> Note: The maximum number of users you can get with this endpoint is 1000. For more use `users.exportUsers`.
> Note: The maximum number of users you can get with this endpoint is 1000. For more, use `users.exportUsers`.

### Paginate through a list of logs using checkpoint pagination

Expand All @@ -174,7 +174,7 @@ const management = new ManagementClient({
const allLogs = [];
let from = '';
while (true) {
const { data: logs } = await mgmntClient.logs.getAll({ from });
const { data: logs } = await management.logs.getAll({ from });
if (!logs.length) {
break;
}
Expand Down Expand Up @@ -248,10 +248,11 @@ const management = new ManagementClient({
clientSecret: '{YOUR_CLIENT_SECRET}',
headers: { 'foo': 'applied to all requests' },
agent: new https.Agent({ ... }),
httpTimeout: 5000
timeoutDuration: 5000
});

await management.users.get({ id: '{user id}' }, { headers: { 'bar': 'applied to this request' } });
await management.users.get({ id: '{user id}',
fields: 'user_metadata,user_id',
include_fields: true });
grjan7 marked this conversation as resolved.
Show resolved Hide resolved
```

### Overriding `fetch`
Expand Down