Intastellar only completes return flows to URLs you pre-registered (or URIs your client allows for the login URI used by the React / plain JS flows). A typo, wrong scheme, or extra slash causes redirect_uri_mismatch (or similar) — the error looks technical, but the cause is usually “the URL doesn’t match the list”.
If you change hostname (domain migration, new CDN), update the Intastellar client so redirect / login entries match the new origin and paths. SDKs often derive a login URI from the current page (hostname, port, pathname) unless you override it — register what you actually send.
Quick checks when it “suddenly broke”
- Compare scheme:
https://vshttp://. - Compare host:
www.vs bare domain. - Compare path:
/callbackvs/callback/. - Compare port in dev:
127.0.0.1vslocalhost. - Confirm you updated staging client vs production client.
Rules of thumb
- HTTPS in production —
http://localhostis often allowed for development; production should usehttps://. - Exact match —
https://app.example.com/callbackandhttps://app.example.com/callback/are different paths; register the one you use in the authorize request. - No wildcards in most setups — register each concrete callback path (or follow your console’s documented pattern if path templates are supported).
- Query strings — avoid dynamic query strings in the registered URI unless registration explicitly allows it; prefer a fixed path and pass internal context via
state.
Multiple environments
Register separate redirect URIs (or separate clients) for:
- Local development (
http://127.0.0.1:5173/auth/callback, etc.) - Staging
- Production
This limits impact if a non-production secret leaks.
SPA routers
If you use hash routing (/#/callback), check whether redirects to that pattern are allowed; many setups require path-based URLs (/auth/callback) for OAuth callbacks.
On the callback route (after redirect)
- Read
codeandstatefrom the query string. - Verify
stateagainst what you stored when you started the flow. - Exchange the code at the token endpoint — Authorization code flow.
- Redirect the user to the final in-app destination (dashboard, return URL stored in
state, etc.).
Frequently asked questions
SDK popup flow — do we still need redirect URIs?
You still need correct client registration and often a registered login / continue pattern. If something fails before the popup finishes, compare what the SDK sends with what is registered — see your integration notes.
We fixed the URL in our code but it still fails
The list in the Intastellar client must change too. Deploying new code does not update registration automatically.
Next
Sessions, cookies, and tokens — persist the signed-in user safely after a successful callback.
Last updated