Skip to content
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

wrong import in DuendeIdentityServer6 example #11265

Open
fmaule opened this issue Jun 26, 2024 · 2 comments
Open

wrong import in DuendeIdentityServer6 example #11265

fmaule opened this issue Jun 26, 2024 · 2 comments
Labels
documentation Relates to documentation triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@fmaule
Copy link

fmaule commented Jun 26, 2024

What is the improvement or update you wish to see?

The provided example in the OAuth docs here has a wrong import.

Is there any context that might help us understand?

import DuendeIdentityServer6 from "next-auth/providers/duende-identityserver6"

the provider is actually called duende-identity-server6

The callback is probably wrong as well ([origin]/api/auth/callback/duende-identityserver6)

I believe the strings are automatically generated based on

"duende-identityserver6": "DuendeIdentityServer6",

Happy to raise a PR to fix the docs

Does the docs page already exist? Please link to it.

https://authjs.dev/getting-started/authentication/oauth

@fmaule fmaule added documentation Relates to documentation triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Jun 26, 2024
@k-taro56
Copy link
Contributor

The function name is used for the import and does not need to be changed.
https://github.com/nextauthjs/next-auth/blob/main/packages/core/src/providers/duende-identity-server6.ts#L92C25-L92C35

The callback URL also does not need to be changed.

@k-taro56
Copy link
Contributor

The OAuthUserConfig.id is part of the callback URL, and the OAuthUserConfig.name is the function name, and an import statement is generated.

The import statement and callback URL for each provider are read directly by the following script, rather than being automatically generated based on next-auth/docs/pages/data/manifest.json.

https://github.com/nextauthjs/next-auth/blob/main/docs/components/OAuthProviderInstructions/OAuthProviderSelect.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Relates to documentation triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

2 participants