Alchemy Logo

AuthParams

type AuthParams =
  | {
      email: string;
      emailMode?: "magicLink" | "otp";
      multiFactors?: VerifyMfaParams[];
      redirectParams?: URLSearchParams;
      type: "email";
    }
  | {
      bundle: string;
      isNewUser?: boolean;
      orgId?: string;
      type: "email";
    }
  | {
      phone: string;
      type: "sms";
    }
  | {
      creationOpts?: CredentialCreationOptionOverrides;
      email: string;
      type: "passkey";
    }
  | {
      createNew: false;
      type: "passkey";
    }
  | {
      createNew: true;
      creationOpts?: CredentialCreationOptionOverrides;
      type: "passkey";
      username: string;
    }
  | (object & OauthProviderConfig & OauthRedirectConfig)
  | {
      accessToken?: string;
      bundle: string;
      idToken: string;
      isNewUser?: boolean;
      orgId: string;
      type: "oauthReturn";
    }
  | {
      authProviderId?: string;
      jwt: string;
      type: "custom-jwt";
    }
  | {
      multiFactors?: VerifyMfaParams[];
      otpCode: string;
      type: "otp";
    }
  | (object & AccessKeyAuthParams);

Defined in: account-kit/signer/src/signer.ts:19

{
  email: string;
  emailMode?: "magicLink" | "otp";
  multiFactors?: VerifyMfaParams[];
  redirectParams?: URLSearchParams;
  type: "email";
}
NameTypeDescription

email

string

emailMode?

"magicLink" | "otp"

Deprecated

This option will be overriden by dashboard settings. Please use the dashboard settings instead. This option will be removed in a future release.

multiFactors?

VerifyMfaParams[]

redirectParams?

URLSearchParams

type

"email"

{
  bundle: string;
  isNewUser?: boolean;
  orgId?: string;
  type: "email";
}
NameType

bundle

string

isNewUser?

boolean

orgId?

string

type

"email"

{
  phone: string;
  type: "sms";
}
NameType

phone

string

type

"sms"

{
  creationOpts?: CredentialCreationOptionOverrides;
  email: string;
  type: "passkey";
}
NameType

creationOpts?

CredentialCreationOptionOverrides

email

string

type

"passkey"

{
  createNew: false;
  type: "passkey";
}
NameType

createNew

false

type

"passkey"

{
  createNew: true;
  creationOpts?: CredentialCreationOptionOverrides;
  type: "passkey";
  username: string;
}
NameType

createNew

true

creationOpts?

CredentialCreationOptionOverrides

type

"passkey"

username

string

object & OauthProviderConfig & OauthRedirectConfig

{
  accessToken?: string;
  bundle: string;
  idToken: string;
  isNewUser?: boolean;
  orgId: string;
  type: "oauthReturn";
}
NameType

accessToken?

string

bundle

string

idToken

string

isNewUser?

boolean

orgId

string

type

"oauthReturn"

{
  authProviderId?: string;
  jwt: string;
  type: "custom-jwt";
}
NameType

authProviderId?

string

jwt

string

type

"custom-jwt"

{
  multiFactors?: VerifyMfaParams[];
  otpCode: string;
  type: "otp";
}
NameType

multiFactors?

VerifyMfaParams[]

otpCode

string

type

"otp"

object & AccessKeyAuthParams

Was this page helpful?