Function: default
providers/notion.default
â–¸ default<P
>(options
): OAuthConfig
<P
>
Add Notion login to your page.
Example​
import { Auth } from "@auth/core"
import Notion from "@auth/core/providers/notion"
const request = new Request("https://example.com")
const response = await Auth(request, {
providers: [Notion({ clientId: "", clientSecret: "", redirectUri: "" })],
})
Resources​
Notes​
You need to select "Public Integration" on the configuration page to get an oauth_id
and oauth_secret
. Private integrations do not provide these details.
You must provide a clientId
and clientSecret
to use this provider, as-well as a redirect URI (due to this being required by Notion endpoint to fetch tokens).
The Notion provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.
If you think you found a bug in the default configuration, you can open an issue.
Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.
Type parameters​
Name | Type |
---|---|
P | extends NotionProfile <P > |
Parameters​
Name | Type |
---|---|
options | Omit <Partial <OAuthConfig <P >>, "type" | "options" > & Required <Pick <OAuthConfig <P >, "clientId" | "clientSecret" >> & AdditionalConfig |
Returns​
OAuthConfig
<P
>