An example Login.gov client application which authenticates users via OpenID Connect (OIDC). Written in Go. Uses the Gin web framework and the Goth authentication package. Disclaimer: Goth is not (yet) a certified OpenID Relaying Party.
Install Go (version 1.9.4).
Install the source code:
go get github.com/18F/identity-oidc-gin cd $GOPATH/src/github.com/18F/identity-oidc-gin
Configure environment variables using a
.env file. At a minimum, set the
SESSION_SECRET variable. For an example, see the
Choose a Login.gov Environment
Development Environment (Local Server)
PROVIDER_URL environment variable to http://localhost:3000.
Run a Login.gov (identity-idp) instance locally on port 3000:
cd path/to/identity-idp make run
PROVIDER_URL environment variable to to one of the sandbox urls:
NOTE: this application's credentials have not yet been deployed to the sandbox environments. this note will be removed when the credentials have been deployed and this application has been tested against these sandbox environments.
Run the app:
go run app.go
Then view in browser at localhost:8080.