Skip to content

Authenticating Users sample for Go and GAE/Go 2nd gen.

Notifications You must be signed in to change notification settings

qt-luigi/go-auth-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-auth-sample

Authenticating Users samples.

Main target is GAE/Go 2nd generation environment.

Now available only Google Sign-in.

Usage

Executing this program on your local machine, you use dev_appserver.py tool.

$ dev_appserver.py app.yaml

Deploying this program to GAE/Go 2nd-gen, you use gcloud command.

$ gcloud app deploy

Google Sign-in

You must set Google Cloud Platform OAuth2 credentials Client ID and Client Secret to an environment variables.

When executing this program on GAE/Go 2nd-gen, Setting it to env_variables: section in app.yaml file.

env_variables:
  GOOGLE_CLIENT_ID: "client_id"
  GOOGLE_CLIENT_SECRET: "client_secret"

When executing this program by go run or a binary, Using export command on bash.

$ export GOOGLE_CLIENT_ID=client_id
$ export GOOGLE_CLIENT_SECRET=client_secret
$ go run main.go

License

MIT

About

Authenticating Users sample for Go and GAE/Go 2nd gen.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published