You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying to deploy keystatic on our infrastructure, i am running into an issue with the redirect_uri setting for github sign in.
the callback uri in the github app is configured to use the /api/keystatic/github/oauth/callback route on the domain the app is deployed to, however the redirect_uri actually used by keystatic is using a hostname internal to our cluster infra. (in our case, the correct hostname would be only on x-forwarded-host header)
which means i cannot sign in, but instead see this error:
An error occurred when trying to authenticate with GitHub:
The redirect_uri MUST match the registered callback URL for this application.
the redirect_uri query param is constructed here by keystatic:
Could you share what framework you're using? I believe Next.js respects x-forwarded-host in the URL passed to route handlers but I think Astro might not, we could probably handle that ourselves
I am also running into this error using Remix + Vite deployed to fly.io.
No issues authenticating locally with github but then i receive An error occurred when trying to authenticate with GitHub: The redirect_uri MUST match the registered callback URL for this application. when i try to sign in against my hosted app.
when trying to deploy keystatic on our infrastructure, i am running into an issue with the
redirect_uri
setting for github sign in.the callback uri in the github app is configured to use the
/api/keystatic/github/oauth/callback
route on the domain the app is deployed to, however theredirect_uri
actually used by keystatic is using a hostname internal to our cluster infra. (in our case, the correct hostname would be only onx-forwarded-host
header)which means i cannot sign in, but instead see this error:
the
redirect_uri
query param is constructed here by keystatic:keystatic/packages/keystatic/src/api/generic.ts
Lines 375 to 378 in bcc3c69
allowing to set the redirect url explicitly via environment variable would work around this issue i think.
The text was updated successfully, but these errors were encountered: