lucia-auth / lucia

Authentication, simple and clean
https://lucia-auth.com
MIT License
8.42k stars 449 forks source link

[Docs]: Missing scope change for Account linking #1477

Closed AugustinSorel closed 4 months ago

AugustinSorel commented 4 months ago

Description

I was following this page about adding account linkingn with github oauth. However when following the doc, I get the following error when hitting https://api.github.com/user/emails

{
  message: 'Not Found',
  documentation_url: 'https://docs.github.com/rest/users/emails#list-email-addresses-for-the-authenticated-user'
}

the fix for this was to change

const url = await github.createAuthorizationURL(state);

to

    const url = await github.createAuthorizationURL(state, {
      scopes: ["user:email"],
    });

I think it would be nice if the doc page would show this change

pilcrowOnPaper commented 4 months ago

Fixed