云盘
志元云盘
备份云盘
Home
/
志元云盘
/
webdav
/
sync
/
go
/
pkg
/
mod
/
github.com
/
coreos
/
go-oidc
/
[email protected]
/
example
File
OriginalPic
Thumbnails
CopyAllDownloadUrl
EditTime
Size
idtoken
2024-09-26 17:24:00
3.51 KB
userinfo
2024-09-26 17:24:00
2.64 KB
README.md
2024-09-26 17:24:00
837 B
# Examples These are example uses of the oidc package. Each requires a Google account and the client ID and secret of a registered OAuth2 application. To create one: 1. Visit your [Google Developer Console][google-developer-console]. 2. Click "Credentials" on the left column. 3. Click the "Create credentials" button followed by "OAuth client ID". 4. Select "Web application" and add "http://127.0.0.1:5556/auth/google/callback" as an authorized redirect URI. 5. Click create and add the printed client ID and secret to your environment using the following variables: ``` GOOGLE_OAUTH2_CLIENT_ID GOOGLE_OAUTH2_CLIENT_SECRET ``` Finally run the examples using the Go tool and navigate to http://127.0.0.1:5556. ``` go run ./example/idtoken/app.go ``` [google-developer-console]: https://console.developers.google.com/apis/dashboard
2025-09-04 20:20:42 Thursday 216.73.216.121 Runningtime:0.018s Mem:1.47 MB