Willem van Dreumel 950f2e2074 | 7 years ago | |
---|---|---|
.. | ||
gothic | 7 years ago | |
providers | 7 years ago | |
LICENSE.txt | 7 years ago | |
README.md | 7 years ago | |
doc.go | 7 years ago | |
provider.go | 7 years ago | |
session.go | 7 years ago | |
user.go | 7 years ago |
Package goth provides a simple, clean, and idiomatic way to write authentication packages for Go web applications.
Unlike other similar packages, Goth, lets you write OAuth, OAuth2, or any other
protocol providers, as long as they implement the Provider
and Session
interfaces.
This package was inspired by https://github.com/intridea/omniauth.
$ go get github.com/markbates/goth
See the examples folder for a working application that lets users authenticate through Twitter, Facebook, Google Plus etc.
To run the example either clone the source from GitHub
$ git clone git@github.com:markbates/goth.git
or use
$ go get github.com/markbates/goth
$ cd goth/examples
$ go get -v
$ go build
$ ./examples
Now open up your browser and go to http://localhost:3000 to see the example.
To actually use the different providers, please make sure you configure them given the system environments as defined in the examples/main.go file
Issues always stand a significantly better chance of getting fixed if the are accompanied by a pull request.
Would I love to see more providers? Certainly! Would you love to contribute one? Hopefully, yes!