Type aliases
APIInterface
APIInterface
: { appleRedirectHandlerPOST
: undefined | ((input
: { code
: string; options
: APIOptions; state
: string; userContext
: any }) => Promise<void>); authorisationUrlGET
: undefined | ((input
: { options
: APIOptions; provider
: TypeProvider; userContext
: any }) => Promise<{ status
: "OK"; url
: string } | GeneralErrorResponse>); signInUpPOST
: undefined | ((input
: { authCodeResponse
?: any; clientId
?: string; code
: string; options
: APIOptions; provider
: TypeProvider; redirectURI
: string; userContext
: any }) => Promise<{ authCodeResponse
: any; createdNewUser
: boolean; session
: SessionContainer; status
: "OK"; user
: User } | { status
: "NO_EMAIL_GIVEN_BY_PROVIDER" } | GeneralErrorResponse>) }Type declaration
appleRedirectHandlerPOST: undefined | ((input: { code: string; options: APIOptions; state: string; userContext: any }) => Promise<void>)
authorisationUrlGET: undefined | ((input: { options: APIOptions; provider: TypeProvider; userContext: any }) => Promise<{ status: "OK"; url: string } | GeneralErrorResponse>)
signInUpPOST: undefined | ((input: { authCodeResponse?: any; clientId?: string; code: string; options: APIOptions; provider: TypeProvider; redirectURI: string; userContext: any }) => Promise<{ authCodeResponse: any; createdNewUser: boolean; session: SessionContainer; status: "OK"; user: User } | { status: "NO_EMAIL_GIVEN_BY_PROVIDER" } | GeneralErrorResponse>)
APIOptions
Type declaration
appInfo: NormalisedAppinfo
config: TypeNormalisedInput
isInServerlessEnv: boolean
recipeId: string
RecipeInterface
RecipeInterface: { getUserById: any; getUserByThirdPartyInfo: any; getUsersByEmail: any; signInUp: any }
Type declaration
getUserById:function
- getUserById(input: { userContext: any; userId: string }): Promise<undefined | User>
Parameters
input: { userContext: any; userId: string }
userContext: any
userId: string
Returns Promise<undefined | User>
getUserByThirdPartyInfo:function
- getUserByThirdPartyInfo(input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<undefined | User>
Parameters
input: { thirdPartyId: string; thirdPartyUserId: string; userContext: any }
thirdPartyId: string
thirdPartyUserId: string
userContext: any
Returns Promise<undefined | User>
getUsersByEmail:function
- getUsersByEmail(input: { email: string; userContext: any }): Promise<User[]>
Parameters
input: { email: string; userContext: any }
email: string
userContext: any
Returns Promise<User[]>
signInUp:function
- signInUp(input: { email: string; thirdPartyId: string; thirdPartyUserId: string; userContext: any }): Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
Parameters
input: { email: string; thirdPartyId: string; thirdPartyUserId: string; userContext: any }
email: string
thirdPartyId: string
thirdPartyUserId: string
userContext: any
Returns Promise<{ createdNewUser: boolean; status: "OK"; user: User }>
TypeProvider
TypeProvider: { id: string; isDefault?: boolean; get: any }
Type declaration
id: string
Optional isDefault?: boolean
get:function
- get(redirectURI: undefined | string, authCodeFromRequest: undefined | string, userContext: any): TypeProviderGetResponse
Parameters
redirectURI: undefined | string
authCodeFromRequest: undefined | string
userContext: any
Returns TypeProviderGetResponse
User
User: { email: string; id: string; thirdParty: { id: string; userId: string }; timeJoined: number }
Type declaration
email: string
id: string
thirdParty: { id: string; userId: string }
timeJoined: number