Skip to main content

This content is from the README file of

Golang code samples for Crossid

This repo demonstrates how to integrate Golang with Crossid.


  1. Tell Crossid about your app.
  2. Setup HTTPS (see below)

App params example:

"client_name": "foo",
"client_secret": "foobar",
"client_id": "myapp",
"redirect_uris": ["https://localhost/callback"],
"audience": ["https://localhost"]


To avoid security issues, this sample is expected to be exposed with HTTPS.

Lets use Caddy to route traffic from port 443 to 3000.

caddy reverse-proxy --from localhost:443 --to localhost:3000

Run the app

git clone
cd samples-golang

# Replace <TENANT> with your crossid tenant
go run . --issuerBaseURL=https://<TENANT> --port 3005 --client-id myapp --client-secret foobar --audience https://localhost

Browser should be opened automatically.

New to Crossid? check out the get started guide