Skip to content

herrberk/example-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

example-app

This example makes use of the oidc package to fetch an access token for a particular client ID. It requires a client ID and secret of a registered OAuth2 application.

  1. Set the following environment variables with client ID and client secret.
GOOGLE_OAUTH2_CLIENT_ID
GOOGLE_OAUTH2_CLIENT_SECRET
  1. Run the example and navigate to http://127.0.0.1:5556.
go run server.go

You will be prompted to login via the provider if you have not done so already. If the login in successful the API will send a response containing the access token to the example application which will be displayed.

About

go-oidc example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%