Log the user in using the input code or link code
{status: "OK", user, createdNewRecipeUser: bool}
if succesful
Create and send a code to the user for passwordless auth
{status: "OK", deviceId, preAuthSessionId, flowType}
If successful
Check if a user with the given email exists
{status: "OK", doesExist: boolean}
Check if a user with the given phone number exists
{status: "OK", doesExist: boolean}
Generate a new state that will be sent to the third party provider
string
Get the URL to be used by the third party provider for redirecting after the auth flow. Also returns PKCE Code Verifier if using PKCE.
{status: "OK", url, pkceCodeVerifier?}
Reads and returns the link code from the current URL
The hash (#) property of the current URL
Get information about the current login attempt from storage
{deviceId, preAuthSessionId, flowType}
if present, returns undefined otherwise
Reads and returns the pre auth session id from the current URL
The "preAuthSessionId" query parameter from the current URL
Reads and returns the tenant id from the current URL
The "tenantId" query parameter from the current URL
Returns the error from the current URL
The "error" query param from the current URL. Returns undefined if no error exists
Returns the auth state from the current URL
The "state" query param from the current URL. Returns an empty string if no state exists
Get the URL that should be opened for third party authentication
URL string
Get the current login state from storage, this is also used when calling signInUp
State object from storage
Resend the code to the user
{status: "OK"}
if succesful
Set information about the current login attempt to storage
Set the login state to storage
Sign up/Sign in the user, this method uses the login attempt information from storage
{status: OK, user, createdNewRecipeUser: boolean}
if succesful
Verify that the state recieved from the third party provider matches the one in storage
Generated using TypeDoc
Clear any information about login attempts from storage