Skip to content

Commit

Permalink
Update custom-providers.md parameter name scopes (#1486)
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyvdSluijs authored Mar 11, 2024
1 parent cabfb58 commit bc25c1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/pages/guides/oauth/custom-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const oauth2Client = new OAuth2Client(clientId, authorizeEndpoint, tokenEndpoint

## Create authorization URL

Create an authorization URL with [`OAuth2Client.createAuthorizationURL()`](https://oslo.js.org/reference/oauth2/OAuth2Client/createAuthorizationURL). This optionally accepts a `state`, `codeVerifier` for PKCE flows, and `scope`.
Create an authorization URL with [`OAuth2Client.createAuthorizationURL()`](https://oslo.js.org/reference/oauth2/OAuth2Client/createAuthorizationURL). This optionally accepts a `state`, `codeVerifier` for PKCE flows, and `scopes`.

```ts
import { generateState, generateCodeVerifier } from "oslo/oauth2";
Expand All @@ -33,7 +33,7 @@ const codeVerifier = generateCodeVerifier(); // for PKCE flow

const url = await oauth2Client.createAuthorizationURL({
state,
scope: ["user:email"],
scopes: ["user:email"],
codeVerifier
});
```
Expand Down

0 comments on commit bc25c1c

Please sign in to comment.