I am blind.. HALP! (oauth redirect config issue)

Hey gang, I know I am blind, but I just can't see what the problem is... just set up this toy app https://cha-chess.vercel.app/ (it's going to be an online chess thing with websocket) and I can't log in! localhost works, production doesn't, I get the "Invalid Oauth2 redirect_uri" error... what am I missing?!?!?!
Create T3 App
Generated by create-t3-app
20 Replies
Neto
Neto•2y ago
are you setting the correct env value for prod?
robotkutya
robotkutya•2y ago
I think so 😭
Neto
Neto•2y ago
I think it's only the first part Without the /api/...
robotkutya
robotkutya•2y ago
I have it like this in another project and it works there, but lemme try anyways
Neto
Neto•2y ago
on the "Invalid Oauth2 redirect_uri"
robotkutya
robotkutya•2y ago
plus I think this should match what you put into discord
Neto
Neto•2y ago
can you paste the redirect url?
robotkutya
robotkutya•2y ago
it's there in the post
Neto
Neto•2y ago
not that
robotkutya
robotkutya•2y ago
?
Neto
Neto•2y ago
when you click to sign in with discord there is a new page with the error
robotkutya
robotkutya•2y ago
that URL?
Neto
Neto•2y ago
yea
robotkutya
robotkutya•2y ago
sure, 1 sec https://discord.com/oauth2/authorize?client_id=1055105361364926484&scope=identify%20email&response_type=code&redirect_uri=https%3A%2F%2Fcha-chess.vercel.app%2Fapi%2Fauth%2Fcallback%2Fapi%2Fauth%2Fcallback%2Fdiscord%2Fapi%2Fauth%2Fdiscord%2Fcallback%2Fdiscord&state=jYOH2sO1iihDcscp7qfZiTJICSVZ-w1F0qpJm_rbkbU this is the one with the error and this is the sign-in https://cha-chess.vercel.app/api/auth/signin?callbackUrl=https%3A%2F%2Fcha-chess.vercel.app%2F
Neto
Neto•2y ago
yep you duplicated the code
Want results from more Discord servers?
Add your server