-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(providers): Add Riot Games RSO Provider #10826
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@ArkShocer is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
public domain to test it or create a proxy in your environment. | ||
</Callout> | ||
|
||
### Signed-JWT Method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this section, maybe we just take that callout warning out of the callout, i.e. just put that as regular text under this heading. And then remove the superfluous example at the bottom. It's not adding anything new that the above examples aren't, right?
Also it uses the pages router path and doesn't use the env var inference, so it could be confusing to new users
* | ||
* ::: | ||
*/ | ||
export default function RSO<P extends RSOProfile>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this seems to be an openid-connect compatible provider, this can be significantly simplified. Can you give this version a shot and let me know if it still works for you?
Also, please double check the profile
return values. We need them to be id
, name
, email
, image
. Since that's what all next-auth users will have in their database via the default schemas, for example. We can't just return any fields we want here (by default). Maybe adding some additional scopes (like account
or profile
) will include the required fields in the id_token
response? (see for example: https://gist.github.com/Henrik-3/d6b631fb7c61821bc16b17cd347a3811#sending-users-to-your-rso-page)
export default function RSO<P extends RSOProfile>(
options: OAuthUserConfig<P>
): OAuthConfig<P> {
return {
id: "rso",
name: "Riot Sign On",
type: "oidc",
issuer: "https://auth.riotgames.com",
authorization: {
params: {
scope: "openid offline_access access_tokens cpid",
},
},
profile(profile) {
return {
id: profile.sub,
name: profile.sub,
email: profile.cpid,
image: profile.jiti,
}
},
style: {
brandColor: "#f05b5e"
},
options
}
}
☕️ Reasoning
Adding Riot Games RSO Provider. Tested it with the current stable next-auth version
4.24.7
on nextjs14.2.3
🧢 Checklist
🎫 Affected issues
📌 Resources