https://github.com/go-macaron/oauth2
Package oauth2 is a middleware that provides support of user login via an OAuth 2.0 backend for Macaron.
https://github.com/go-macaron/oauth2
Last synced: 9 months ago
JSON representation
Package oauth2 is a middleware that provides support of user login via an OAuth 2.0 backend for Macaron.
- Host: GitHub
- URL: https://github.com/go-macaron/oauth2
- Owner: go-macaron
- License: apache-2.0
- Created: 2014-11-26T18:01:22.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T07:25:15.000Z (almost 6 years ago)
- Last Synced: 2025-03-27T03:01:43.785Z (10 months ago)
- Language: Go
- Size: 38.1 KB
- Stars: 14
- Watchers: 3
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OAuth2
Middleware oauth2 provides support of user login via an OAuth 2.0 backend for [Macaron](https://github.com/go-macaron/macaron).
## Usage
```go
// ...
m.Use(oauth2.Google(
&goauth2.Config{
ClientID: "client_id",
ClientSecret: "client_secret",
Scopes: []string{"https://www.googleapis.com/auth/drive"},
RedirectURL: "redirect_url",
},
))
// ...
```
## Credits
This package is forked from [martini-contrib/oauth2](https://github.com/martini-contrib/oauth2) with modifications.
## License
This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text.