Type aliases
GetRedirectionURLContext
GetRedirectionURLContext: AuthRecipeModuleGetRedirectionURLContext
OnHandleEventContext
OnHandleEventContext: AuthRecipeModuleOnHandleEventContext | { action: "SUCCESS"; isNewUser: boolean; user: { email: string; id: string } }
PreAPIHookContext
PreAPIHookContext: AuthRecipeModulePreAPIHookContext | { action: "GET_AUTHORISATION_URL"; requestInit: RequestInit; url: string } | { action: "THIRD_PARTY_SIGN_IN_UP"; requestInit: RequestInit; url: string }
RecipeInterface
RecipeInterface: { getOAuthAuthorisationURL: any; getOAuthState: any; redirectToThirdPartyLogin: any; setOAuthState: any; signInAndUp: any }
Type declaration
getOAuthAuthorisationURL:function
- getOAuthAuthorisationURL(input: { config: NormalisedConfig; thirdPartyId: string }): Promise<string>
Parameters
input: { config: NormalisedConfig; thirdPartyId: string }
config: NormalisedConfig
thirdPartyId: string
Returns Promise<string>
getOAuthState:function
- getOAuthState(): undefined | StateObject
Returns undefined | StateObject
redirectToThirdPartyLogin:function
- redirectToThirdPartyLogin(input: { config: NormalisedConfig; state?: StateObject; thirdPartyId: string }): Promise<{ status: "OK" | "ERROR" }>
Parameters
input: { config: NormalisedConfig; state?: StateObject; thirdPartyId: string }
config: NormalisedConfig
Optional state?: StateObject
thirdPartyId: string
Returns Promise<{ status: "OK" | "ERROR" }>
setOAuthState:function
- setOAuthState(state: StateObject): void
signInAndUp:function
- signInAndUp(input: { config: NormalisedConfig; thirdPartyId: string }): Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" | "GENERAL_ERROR" } | { error: string; status: "FIELD_ERROR" }>
Parameters
input: { config: NormalisedConfig; thirdPartyId: string }
config: NormalisedConfig
thirdPartyId: string
Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" | "GENERAL_ERROR" } | { error: string; status: "FIELD_ERROR" }>