Interface: CredentialsConfig<CredentialsInputs>
providers/credentials.CredentialsConfig
TODO:
Type parametersβ
Name | Type |
---|---|
CredentialsInputs | extends Record <string , CredentialInput > = Record <string , CredentialInput > |
Hierarchyβ
β³
CredentialsConfig
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.
There is no validation on the inputs, so make sure you do so.
Parametersβ
Name | Type | Description |
---|---|---|
credentials | undefined | Record <keyof CredentialsInputs , string > | See CredentialInput |
request | Pick <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β
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"