Name | Description |
client | Client The Client object for the current window. |
user | User | null | undefined A shortcut to session.user which holds the currently active User object. If session is null or undefined, this field will match. |
session | Session | null | undefined The currently active Session, which is guaranteed to be one of the Session's in client.sessions. If there is no active Session, this field will be null. If the Session is loading, this field will be undefined. |
No arguments.
No return value.
Closes the SignIn modal.
No arguments.
No return value.
Closes the SignUp modal.
No arguments.
No return value.
Opens the SignIn modal.
No arguments.
No return value.
Opens the SignUp modal.
Name | Description |
session | Session | string | null A Session object or Session ID string to be set as this.session, or null to remove the active session. |
beforeEmit? | (session: Session | null) => Promise<any> | void Usually used for navigation — the passed function will run while this.session is set to undefined, before finally being set to the passed session. |
Returns a promise that resolves after after passed session is set. The promise does not resolve a value.
Change this.session to the passed session. The change happens in three steps:
this.session is set to undefined, which causes the control components to stop rendering their children as though Clerk is still initializing.
beforeEmit is run. If a promise is returned, Clerk waits for the promise to resolve.
this.session is set to the passed session. This causes the control components to render their children again.