Skip to content

Commit

Permalink
update oauth migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Jan 23, 2024
1 parent 08cec29 commit b3be089
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/pages/upgrade-v3/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The OAuth integration has been replaced with [Arctic](https://github.com/pilcrow
npm install arctic
```

You can initialize the providers without passing the Lucia instance.
You can initialize the providers without passing the Lucia instance and it does not accept scopes.

```ts
import { GitHub } from "arctic";
Expand All @@ -41,7 +41,9 @@ const state = generateState();

// pass state (and code verifier for PKCE)
// returns the authorization url only
const authorizationURL = await githubAuth.createAuthorizationURL(state);
const authorizationURL = await githubAuth.createAuthorizationURL(state, {
scopes: ["email"] // pass scopes here instead
});

setCookie("github_oauth_state", state, {
secure: true, // set to false in localhost
Expand Down

0 comments on commit b3be089

Please sign in to comment.