Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README - Improvement and updation for making it more new user friendly #572

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
178 changes: 100 additions & 78 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,101 +10,123 @@ This package was inspired by [https://github.com/intridea/omniauth](https://gith

## Installation

Paste the following command in the terminal

```text
$ go get github.com/markbates/goth
go get github.com/markbates/goth
```

## Supported Providers

* Amazon
* Apple
* Auth0
* Azure AD
* Battle.net
* Bitbucket
* Box
* ClassLink
* Cloud Foundry
* Dailymotion
* Deezer
* DigitalOcean
* Discord
* Dropbox
* Eve Online
* Facebook
* Fitbit
* Gitea
* GitHub
* Gitlab
* Google
* Google+ (deprecated)
* Heroku
* InfluxCloud
* Instagram
* Intercom
* Kakao
* Lastfm
* LINE
* Linkedin
* Mailru
* Meetup
* MicrosoftOnline
* Naver
* Nextcloud
* Okta
* OneDrive
* OpenID Connect (auto discovery)
* Oura
* Patreon
* Paypal
* Reddit
* SalesForce
* Shopify
* Slack
* Soundcloud
* Spotify
* Steam
* Strava
* Stripe
* TikTok
* Tumblr
* Twitch
* Twitter
* Typetalk
* Uber
* VK
* WeCom
* Wepay
* Xero
* Yahoo
* Yammer
* Yandex
* Zoom
- Amazon
- Apple
- Auth0
- Azure AD
- Battle.net
- Bitbucket
- Box
- ClassLink
- Cloud Foundry
- Dailymotion
- Deezer
- DigitalOcean
- Discord
- Dropbox
- Eve Online
- Facebook
- Fitbit
- Gitea
- GitHub
- Gitlab
- Google
- Google+ (deprecated)
- Heroku
- InfluxCloud
- Instagram
- Intercom
- Kakao
- Lastfm
- LINE
- Linkedin
- Mailru
- Meetup
- MicrosoftOnline
- Naver
- Nextcloud
- Okta
- OneDrive
- OpenID Connect (auto discovery)
- Oura
- Patreon
- Paypal
- Reddit
- SalesForce
- Shopify
- Slack
- Soundcloud
- Spotify
- Steam
- Strava
- Stripe
- TikTok
- Tumblr
- Twitch
- Twitter
- Typetalk
- Uber
- VK
- WeCom
- Wepay
- Xero
- Yahoo
- Yammer
- Yandex
- Zoom

## Examples

See the [examples](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
To run the example use either of the methods below ::

1. Clone the source from GitHub - (Copy and paste the following command block into your terminal.)
```text
git clone git@github.com:markbates/goth.git
cd goth/examples
go get -v
go build
./examples
```

```text
$ git clone git@github.com:markbates/goth.git
```
or use

2. Get the repository as a dependency - (Copy and paste the following command block into your terminal.)
```text
go get github.com/markbates/goth
cd $GOPATH/pkg/mod/github.com/markbates/goth@v1.80.0/examples
go get -v
go build
./examples
```
Note: The second command navigates to the appropriate `/examples` directory. Note that the specific version of Goth (`goth@v1.80.0`) in the directory path may change in the future, requiring an update to the command accordingly.

Now open up your browser and go to [http://localhost:3000](http://localhost:3000) to see the example.

Most likely error screen will appear for most of the options when clicked on. To actually use the different providers, please make sure you set environment variables before running the built Go program (example.exe in this case).

Environment variables can be set using following command in the terminal

```text
$ go get github.com/markbates/goth
```
```text
$ cd goth/examples
$ go get -v
$ go build
$ ./examples
export key=value
```

Now open up your browser and go to [http://localhost:3000](http://localhost:3000) to see the example.
For example, To enable Google Sign-in, set the environment variables `GOOGLE_KEY` and `GOOGLE_SECRET` to their corresponding values. Obtain these credentials from Google Cloud Console.

To actually use the different providers, please make sure you set environment variables. Example given in the examples/main.go file
```text
export GOOGLE_KEY=your_google_client_id
export GOOGLE_SECRET=your_google_secret_key
```

## Security Notes

Expand Down
Loading