Skip to content

OAuth callbacks

OAuth providers want a single, pre-registered redirect URI. A changing localhost:<port> is awkward to register and breaks when the port moves. routeup gives you a stable URL to register once.

Many providers accept an HTTPS localhost redirect. For those, a local route is enough, no server or token needed:

terminal
routeup serve example-app --port 3000

Register:

https://example-app.localhost/oauth/callback

Because routeup serves trusted HTTPS on *.localhost, secure cookies and https-only SDKs exercise production-like secure-origin behavior locally.

Some providers reject localhost or need to reach you directly. Expose the route and register the public URL. Configure public exposure first using Exposing publicly. This example assumes your saved token allows *.mukul.routeup.dev:

terminal
routeup serve example-app --port 3000 --expose
https://example-app.mukul.routeup.dev/oauth/callback

The route name and token namespace do not depend on the underlying dev port, so you can request the same redirect URI on each run. Public claims remain subject to the server’s normal conflict rules. See Routes.