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

SignIn callback parameters are wrong in documentation #12116

Open
AndreiBadescu opened this issue Oct 25, 2024 · 1 comment
Open

SignIn callback parameters are wrong in documentation #12116

AndreiBadescu opened this issue Oct 25, 2024 · 1 comment
Labels
triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@AndreiBadescu
Copy link

AndreiBadescu commented Oct 25, 2024

What is the improvement or update you wish to see?

callbacks: { async signIn({ profile }) { // Only allow sign in for users with email addresses ending with "yourdomain.com" return profile?.email?.endsWith("@yourdomain.com") }

This code from documentation is not working.

It should either be:

signIn(profile) or signIn({ user, account, profile, email, credentials })

Is there any context that might help us understand?

Should be clear enough.

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

https://authjs.dev/reference/sveltekit/types#signin

@AndreiBadescu AndreiBadescu added the triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. label Oct 25, 2024
@halvaradop
Copy link
Contributor

The current documentation on the signIn callback is accurate. This method enables you to add an extra verification step to determine whether a user can access your application. For example, you could use it to confirm that the user’s email is a corporate email provided by your organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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