// use case
Expose your Gin dev server to the OAuth provider for OAuth callback
Reserve a stable subdomain
On the lrok free plan you keep one reserved subdomain forever. Pick a name your the OAuth provider dashboard can hold onto — webhook URLs that survive laptop restarts mean fewer dashboard re-pastes.
$ lrok reserve gin-oauth Reserved https://gin-oauth.lrok.ioRun your Gin app
Start the dev server on port 8080 (the Gin default).
$ go run .Tunnel localhost to the public URL
lrok forwards https://gin-oauth.lrok.io/webhook → http://127.0.0.1:8080/webhook. The flag --hint binds your reserved subdomain to this tunnel.
$ lrok http 8080 --hint gin-oauth Forwarding https://gin-oauth.lrok.io -> http://127.0.0.1:8080Paste the URL into the OAuth provider
OAuth app settings → Redirect URIs. Paste https://gin-oauth.lrok.io/webhook as the destination.
Watch deliveries land in the request inspector
Every webhook the OAuth provider sends shows up at lrok.io/dashboard with full body, headers, status, and latency. Re-deliver any request to your Gin handler with one click. Make sure the redirect URI you register matches exactly — protocol, host, path, and trailing slash. Mismatches produce the cryptic "redirect_uri_mismatch" error.
// why lrok for this
lrok's reserved subdomain is free and lives forever, so your the OAuth provider oauth callback URL never rotates. $9/mo flat for unlimited tunnels — no SSO tax, no enterprise-only signature verification, no bandwidth metering. The request inspector is built in.
Related workflows
- Expose your Next.js dev server to the OAuth provider for OAuth callback
- Expose your Django dev server to the OAuth provider for OAuth callback
- Expose your Rails dev server to the OAuth provider for OAuth callback
- Expose your Gin dev server to Stripe for Stripe webhooks
- Expose your Gin dev server to GitHub for GitHub webhooks