Closed felipap closed 1 month ago
Hey there! The docs are slightly wrong, while certain OAuth providers allow us to automatically verify the email address, that's not the case for all of them. Google will often be automatically be verified, Apple is automatically verified but GitHub and Microsoft will not automatically verify. I'll make sure those docs are updated.
What should happen when the email is unverified is AuthKit should show a page where you can paste in the code from the email. Are you saying that you're instead getting back that generic error message?
If that's the case, can you give us detailed reproduction steps?
Hey Paul, thank you for the help!
What should happen when the email is unverified is AuthKit should show a page where you can paste in the code from the email. Are you saying that you're instead getting back that generic error message?
This is not happening when I use my own UI. Instead, L20 of the middleware code throws "Email ownership must be verified before authentication", causing the user to see that code. I'm not seeing code that handles any of this email verification logic.
Can you elaborate by what you mean by "when I use my own UI"? Are you using the authkit-nextjs library or building your own auth UI with the workos-node SDK?
It would help if you provided some sample code and reproduction steps for us to investigate this further.
Closing this due to lack of activity. Feel free to reopen if you're still experiencing this issue.
Users with unverified emails are seeing the following when they try to sign up via GitHub:
Here is the code for the route in charge. It's simply calling the
handleAuth()
handler:At the same time, users also receive an email asking them to verify their email:
The error confuses me for a couple reasons. First, the documentation states that users "signing with Magic Auth, OAuth, or SSO are automatically verified". So why do they need to verify their emails when they use GitHub?
Second, there is nowhere for users to input this code. Don't I need a way to tell
handleAuth()
where to redirect users in case of unverified emails?I'm aware of the code inside
src/app/using-your-own-ui/verify-email/
but I don't know how to connect it to the rest. There is no Verify Email redirect to configure in the dashboard, or argument I can pass to handleAuth.