Discord + Expo plugin not working

Hi I'm trying to use the Better Auth Expo package along with Discord to implement auth in my app but I've been stuck trying to fix this issue for the past few days. I've configured my auth redirect url to be https://api.botsfordiscord.app/api/auth/callback/discord and have added to the list of redirect uris in the Discord developer dashboard. However, when I go ahead and try logging in, I get "Invalid OAuth2 redirect_uri" eventhough it's a valid uri. I looked into the uri that better auth is generating and it's this: https://discord.com/oauth2/authorize?scope=identify+email&response_type=code&client_id=743108048892985425&redirect_uri=https://api.botsfordiscord.app/api/auth/callback/discord&state=jsk9hS34ltgAeHVS85gFZOStkVF7o_gS&prompt=none I went into the Discord developer dashboard and used their oauth url generator and it basically gave me the same url but it added two plus signs before the redirect_uri. This uri doesn't return invalid and actually works: https://discord.com/oauth2/authorize?scope=identify+email&response_type=code&client_id=743108048892985425&redirect_uri=++https://api.botsfordiscord.app/api/auth/callback/discord&state=jsk9hS34ltgAeHVS85gFZOStkVF7o_gS&prompt=none So my question is how can I get better auth to add those two plus signs before the url to get my login to work? Is this an issue with better auth itself? Would appreciate any help because I've spent so much time over the past few days thinking it was an issue with my code.
No description
1 Reply
3eif
3eifOP7d ago
Should I make a github issue for this instead

Did you find this page helpful?