xephyr
xephyr
BABetter Auth
Created by xephyr on 4/22/2025 in #help
"Email is missing" error with Generic OAuth2 plugin
I'm getting an error that the "Email is missing" when I sign-up using my generic oauth2 provider as the user endpoint returns only { accountId: string, displayName: string }. Clerk handles this by presenting the user with another form in which they must enter their email, but I'm not seeing how to configure this with better-auth. Anyone have ideas?
2 replies
BABetter Auth
Created by xephyr on 4/15/2025 in #help
Anyone using auth.api in a server action with useActionState?
I'm having trouble getting the session to update, have followed the docs to use the nextCookies() plugin but the example server action doesn't return anything so I'm not really sure how that's meant to work. Maybe I'm holding it wrong, but my current setup is using a server action with useActionState on my sign in form so that I can display errors. The server action calls auth.api.signInEmail and redirects on success, or returns errors to the action state for me to display in the form. My UI doesn't update to replace the "Sign Up"/"Sign In" buttons with the "Sign Out" button as I would expect, so I suspect the cookies aren't being set?
3 replies