State check failing for Discord OAUTH2
First time using Better Auth with MongoDB. Here's my sign in function:
After clicking, the user is redirected to
https://discord.com/oauth2/authorize?scope=identify+email+identify+guilds&response_type=code&client_id=1355667186252910733&redirect_uri=https%3A%2F%2Fdev.domain.xyz%2Fapi%2Fauth%2Fcallback%2Fdiscord&state=eVUCntIyBg3F2ebiRDryvuwbB2C9OFO0&prompt=none
In the DB it looks like this:
I'm not sure why it keeps saying thate state not found, whilst I can see it's in the redirect.
When clicking return to Application, you're logged in successfully.
3 Replies
this has been broken
So is it going to be fixed or is there a temporary fix for right now?
state not found is returned when discord actually doesn't return the initial state. I couldn't reproduce it on my end. If it's open source or if you have a POC would like to take a look.