Skip to main content

Interface: CredentialsConfig<CredentialsInputs>

providers/credentials.CredentialsConfig

TODO:

Type parameters​

NameType
CredentialsInputsextends Record<string, CredentialInput> = Record<string, CredentialInput>

Hierarchy​

Properties​

authorize​

β€’ authorize: (credentials: undefined | Record<keyof CredentialsInputs, string>, request: Pick<RequestInternal, "headers" | "method" | "body" | "query">) => Awaitable<null | User>

Type declaration​

β–Έ (credentials, request): Awaitable<null | User>

Gives full control over how you handle the credentials received from the user.

NOTE

There is no validation on the inputs, so make sure you do so.

Parameters​
NameTypeDescription
credentialsundefined | Record<keyof CredentialsInputs, string>See CredentialInput
requestPick<RequestInternal, "headers" | "method" | "body" | "query">Todo Return the original Request as is.
Returns​

Awaitable<null | User>


id​

β€’ id: string

Uniquely identifies the provider in AuthConfig.providers It's also part of the URL

Inherited from​

CommonProviderOptions.id


name​

β€’ name: string

The provider name used on the default sign-in page's sign-in button. For example if it's "Google", the corresponding button will say: "Sign in with Google"

Inherited from​

CommonProviderOptions.name