Skip to content

Commit

Permalink
doc: signUp for local povider (#698)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijayabhaskar96 authored Mar 4, 2024
1 parent 7865ba3 commit a3538f1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/content/3.application-side/2.session-access-and-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a3538f1

Please sign in to comment.