createOAuthHandler
Last updated
Last updated
Create a fetch request handler to handle an OAuth authentication flow. The credentials are stored in the installation configuration as installationCredentialsKey
.
See the Configurations section to learn more.
Argument | Type | Description |
---|---|---|
*required
clientId
*
string
ID of the client application in the OAuth provider.
clientSecret
*
string
Secret of the client application in the OAuth provider.
authorizeURL
*
string
URL to redirect the user to, for authorization.
accessTokenURL
*
string
URL to exchange the OAuth code for an access token.
redirectURL
string
Redirect URL to use. When the OAuth identity provider only accepts a static one.
scopes
string[]
Scopes to ask for.
prompt
string
Optional configuration for a prompt during the OAuth process.
extractCredentials
function
Extract the credentials from the code exchange response.