Open AndreiBadescu opened 1 month ago
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.
@halvaradop Andrei is talking about the curly braces around profile. The functionality works but the syntax in the code example is simply incorrect.
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