-
-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc: signUp for local povider (#698)
- Loading branch information
1 parent
7865ba3
commit a3538f1
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,21 @@ lastRefreshedAt.value | |
// Get / Reload the current session from the server, pass `{ required: true }` to force a login if no session exists | ||
await getSession() | ||
|
||
// Trigger a sign-up, where `credentials` are the credentials your sign-up endpoint expects, e.g. `{ name:'Alice', email: '[email protected]', password: 'securepassword' }` | ||
await signUp(credentials); | ||
|
||
// Trigger a sign-up with auto sign-in and redirect to the profile page within the application | ||
await signUp(credentials, { callbackUrl: '/profile', redirect: true }); | ||
|
||
// Trigger a sign-up with auto sign-in and redirect to an external website (https://external.example.com) | ||
await signUp(credentials, { callbackUrl: 'https://external.example.com', redirect: true, external: true }); | ||
|
||
// Trigger a sign-up without auto sign-in and redirect to the home page within the application | ||
await signUp(credentials, { callbackUrl: '/', redirect: true }, { preventLoginFlow: true }); | ||
|
||
// Trigger a sign-up without auto sign-in and doesn't redirect anywhere | ||
await signUp(credentials, undefined, { preventLoginFlow: true }); | ||
|
||
// Trigger a sign-in, where `credentials` are the credentials your sign-in endpoint expected, e.g. `{ username: 'bernd', password: 'hunter2' }` | ||
await signIn(credentials) | ||
|
||
|