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

Sveltekit docs referers to NextAuth in some places. #10881

Closed
gerhardcit opened this issue May 11, 2024 · 2 comments
Closed

Sveltekit docs referers to NextAuth in some places. #10881

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

Comments

@gerhardcit
Copy link

What is the improvement or update you wish to see?

This is the sample provided with sveltekit selected.

export const { handlers, auth, signIn, signOut } = NextAuth({
  callbacks: {
    async signIn({ account, profile }) {
      if (account.provider === "google") {
        return profile.email_verified && profile.email.endsWith("@example.com")
      }
      return true // Do different verification for other providers that don't have `email_verified`
    },
  },
})

Is there any context that might help us understand?

https://authjs.dev/getting-started/providers/google#configuration
has a selection for Next.js, Sveltekit and Express

if you change that, you would expect the rest of the page to adjust it's examples to that.

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

https://authjs.dev/getting-started/providers/google#email-verified

@gerhardcit gerhardcit added documentation Relates to documentation triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels May 11, 2024
@ndom91
Copy link
Member

ndom91 commented May 12, 2024

This is kind of by design. Ideally we'd have every single code example on the site be dynamic, but currently only the ones which exlicitly have the framework tabs change (and do sync with one another).

The configuration object between the different frameworks is identical though so it shouldn't be very challenging to see how one example fits for sveltekit, for example, in the case where it may be missing an explicit tab framework switcher.

@ndom91 ndom91 closed this as completed May 12, 2024
@ndom91
Copy link
Member

ndom91 commented May 12, 2024

Thanks for your interest though. If yuo'd like to contribute more code examples for the various framework's we'd be happy about any PR's 😊

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