Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

Methods

  • getAuthorisationURLWithQueryParamsAndSetState(input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; shouldTryLinkingWithSessionUser?: boolean; thirdPartyId: string; userContext?: any }): Promise<string>
  • Get the URL that should be opened for third party authentication

    throws

    STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"

    Parameters

    • input: { frontendRedirectURI: string; options?: RecipeFunctionOptions; redirectURIOnProviderDashboard?: string; shouldTryLinkingWithSessionUser?: boolean; thirdPartyId: string; userContext?: any }
      • frontendRedirectURI: string
      • Optional options?: RecipeFunctionOptions
      • Optional redirectURIOnProviderDashboard?: string
      • Optional shouldTryLinkingWithSessionUser?: boolean
      • thirdPartyId: string
      • Optional userContext?: any

    Returns Promise<string>

    URL string

  • getStateAndOtherInfoFromStorage<CustomStateProperties>(input?: { userContext?: any }): undefined | StateObject & CustomStateProperties
  • Get the current login state from storage, this is also used when calling signInUp

    Type Parameters

    • CustomStateProperties

    Parameters

    • Optional input: { userContext?: any }
      • Optional userContext?: any

    Returns undefined | StateObject & CustomStateProperties

    State object from storage

  • signInAndUp(input?: { options?: RecipeFunctionOptions; userContext?: any }): Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>
  • Sign up/Sign in the user, this method uses the login attempt information from storage

    throws

    STGeneralError if the API exposed by the backend SDKs returns status: "GENERAL_ERROR"

    Parameters

    Returns Promise<{ createdNewRecipeUser: boolean; fetchResponse: Response; status: "OK"; user: User } | { fetchResponse: Response; status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | { fetchResponse: Response; reason: string; status: "SIGN_IN_UP_NOT_ALLOWED" }>

    {status: OK, user, createdNewRecipeUser: boolean} if successful

  • signOut(input?: { userContext?: any }): Promise<void>

Generated using TypeDoc