Auth
Email

Email

After instantiating the SDK (which is explained here), you're allowed to use the following methods from auth.email.

initialize()

Parameters

EmailInitializeAuthParams The parameters for creating an account (email, redirectUrl and expirationSeconds).

Returns

Promise<void>

Example

const initializeEmailAuth = await sdk.auth.email.initialize({
  email: "user-email@test.com",
  redirectUrl: "https://fourt.io",
  expirationSeconds: 900, // Optional, defaulted to 15 minutes
});

complete()

Parameters

EmailCompleteAuthWithBundleParams The parameters are received as URL params, which are necessary to complete the authentication process. (bundle and subOrgId).

Returns

Promise<void>

Example

const completeEmailAuth = await sdk.auth.email.complete({
  bundle: "BUNDLE_ID",
  subOrgId: "SUB_ORG_ID",
});