This repo demonstrates how to integrate Golang with Crossid.
- Tell Crossid about your app.
- 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
git clone https://github.com/crossid/samples-golang
cd samples-golang
# Replace <TENANT> with your crossid tenant
go run . --issuerBaseURL=https://<TENANT>.crossid.io/api/v1/oauth2/authorization-servers/default --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