Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nicolasparada/go-oauth2-client-short
Simple oauth2 client with Go
https://github.com/nicolasparada/go-oauth2-client-short
oauth2 oauth2-client social-login
Last synced: 6 days ago
JSON representation
Simple oauth2 client with Go
- Host: GitHub
- URL: https://github.com/nicolasparada/go-oauth2-client-short
- Owner: nicolasparada
- Created: 2022-08-21T17:51:13.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-21T19:24:49.000Z (about 2 years ago)
- Last Synced: 2024-04-14T07:10:35.768Z (7 months ago)
- Topics: oauth2, oauth2-client, social-login
- Language: Go
- Homepage: https://www.youtube.com/shorts/ychqnQCKCg8
- Size: 17.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go OAuth2 Client
Source code of .
It's just a simple demo of how to make an OAuth2 client. In this specific example using GitHub.
Go to
and create a new OAuth application.
Set the redirect callback URI to .
Copy the client ID and secret and put them in a `.env` file like so:```env
GITHUB_CLIENT_ID=YOUR_CLIENT_ID_HERE
GITHUB_CLIENT_SECRET=YOUR_CLIENT_SECRET_HERE
```Build and run:
```bash
go build
./go-oauth2-client-short
```Visit .