From 0fc8266c6b06d18aed5428ed25b4ea1d0cfeb0b2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 05:34:15 +0530 Subject: [PATCH 1/9] improve the running of the example program part of the documentation --- README.md | 167 +++++++++++++++++++++++++++++------------------------- 1 file changed, 89 insertions(+), 78 deletions(-) diff --git a/README.md b/README.md index af0dc00b..91ea2e37 100644 --- a/README.md +++ b/README.md @@ -16,95 +16,106 @@ $ 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 + $ `text git clone git@github.com:markbates/goth.git` + $ `text cd goth/examples` + $ `text go get -v` + $ `text go build` + $ `text ./examples` -```text -$ git clone git@github.com:markbates/goth.git -``` or use -```text -$ go get github.com/markbates/goth -``` -```text -$ cd goth/examples -$ go get -v -$ go build -$ ./examples -``` + +2. Get the repository as a dependency + $ `text go get github.com/markbates/goth` + $ `text cd $GOPATH/pkg/mod/github.com/markbates/goth@v1.80.0/examples` + $ `text cd goth/examples` + $ `text go get -v` + $ `text go build` + $ `text ./examples` + Note: The version of the goth `goth@v1.80.0` in the path above is subject to change in the future Now open up your browser and go to [http://localhost:3000](http://localhost:3000) to see the example. -To actually use the different providers, please make sure you set environment variables. Example given in the examples/main.go file +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 +$ `text export key=value` + +For example, To set the environment variables for GOOGLE sign-in use where the respective value of the GOOGLE_KEY and GOOGLE_SECRET. These can be found/created using the google cloud console. +$ `text export GOOGLE_KEY=your_google_client_id` +$ `text export GOOGLE_SECRET=your_google_secret_key` ## Security Notes From c1c2c8ea3ecdc98c11e330c4044ea07a8fc526ee Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 05:48:44 +0530 Subject: [PATCH 2/9] formatting change --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 91ea2e37..d2028d16 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,7 @@ This package was inspired by [https://github.com/intridea/omniauth](https://gith ## Installation -```text -$ go get github.com/markbates/goth -``` +$ `text go get github.com/markbates/goth` ## Supported Providers @@ -89,21 +87,21 @@ through Twitter, Facebook, Google Plus etc. To run the example use either of the methods below :: 1. Clone the source from GitHub - $ `text git clone git@github.com:markbates/goth.git` - $ `text cd goth/examples` - $ `text go get -v` - $ `text go build` + $ `text git clone git@github.com:markbates/goth.git` + $ `text cd goth/examples` + $ `text go get -v` + $ `text go build` $ `text ./examples` or use -2. Get the repository as a dependency - $ `text go get github.com/markbates/goth` - $ `text cd $GOPATH/pkg/mod/github.com/markbates/goth@v1.80.0/examples` - $ `text cd goth/examples` - $ `text go get -v` - $ `text go build` - $ `text ./examples` +2. Get the repository as a dependency + $ `text go get github.com/markbates/goth` + $ `text cd $GOPATH/pkg/mod/github.com/markbates/goth@v1.80.0/examples` + $ `text cd goth/examples` + $ `text go get -v` + $ `text go build` + $ `text ./examples` Note: The version of the goth `goth@v1.80.0` in the path above is subject to change in the future Now open up your browser and go to [http://localhost:3000](http://localhost:3000) to see the example. From 456fb48ccb10c00a0bc7696f3071739eb7880a8e Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 05:54:28 +0530 Subject: [PATCH 3/9] formatting changes 2 iteration --- README.md | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index d2028d16..039b4ff0 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,9 @@ This package was inspired by [https://github.com/intridea/omniauth](https://gith ## Installation -$ `text go get github.com/markbates/goth` +```text +$ go get github.com/markbates/goth +``` ## Supported Providers @@ -87,21 +89,25 @@ through Twitter, Facebook, Google Plus etc. To run the example use either of the methods below :: 1. Clone the source from GitHub - $ `text git clone git@github.com:markbates/goth.git` - $ `text cd goth/examples` - $ `text go get -v` - $ `text go build` - $ `text ./examples` + ```text + $ git clone git@github.com:markbates/goth.git + cd goth/examples + go get -v + go build + ./examples + ``` or use -2. Get the repository as a dependency - $ `text go get github.com/markbates/goth` - $ `text cd $GOPATH/pkg/mod/github.com/markbates/goth@v1.80.0/examples` - $ `text cd goth/examples` - $ `text go get -v` - $ `text go build` - $ `text ./examples` +2. Get the repository as a dependency + ```text + $ go get github.com/markbates/goth + cd $GOPATH/pkg/mod/github.com/markbates/goth@v1.80.0/examples + cd goth/examples + go get -v + go build + ./examples + ``` Note: The version of the goth `goth@v1.80.0` in the path above is subject to change in the future Now open up your browser and go to [http://localhost:3000](http://localhost:3000) to see the example. @@ -109,11 +115,17 @@ Now open up your browser and go to [http://localhost:3000](http://localhost:3000 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 -$ `text export key=value` + +```text +$ export key=value +``` For example, To set the environment variables for GOOGLE sign-in use where the respective value of the GOOGLE_KEY and GOOGLE_SECRET. These can be found/created using the google cloud console. -$ `text export GOOGLE_KEY=your_google_client_id` -$ `text export GOOGLE_SECRET=your_google_secret_key` + +```text +$ export GOOGLE_KEY=your_google_client_id +export GOOGLE_SECRET=your_google_secret_key +``` ## Security Notes From deaada7714ab594565b1e848609f249e25bb794b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 06:01:02 +0530 Subject: [PATCH 4/9] formatting changes 3 iteration --- README.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 039b4ff0..b4142a6c 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,10 @@ 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 @@ -88,9 +90,9 @@ through Twitter, Facebook, Google Plus etc. To run the example use either of the methods below :: -1. Clone the source from GitHub +1. Clone the source from GitHub - (copy and paste the whole command line block from below in the terminal) ```text - $ git clone git@github.com:markbates/goth.git + git clone git@github.com:markbates/goth.git cd goth/examples go get -v go build @@ -99,9 +101,9 @@ To run the example use either of the methods below :: or use -2. Get the repository as a dependency +2. Get the repository as a dependency - (copy and paste the whole command line block from below in the terminal) ```text - $ go get github.com/markbates/goth + go get github.com/markbates/goth cd $GOPATH/pkg/mod/github.com/markbates/goth@v1.80.0/examples cd goth/examples go get -v @@ -117,16 +119,18 @@ Most likely error screen will appear for most of the options when clicked on. To Environment variables can be set using ```text -$ export key=value +export key=value ``` For example, To set the environment variables for GOOGLE sign-in use where the respective value of the GOOGLE_KEY and GOOGLE_SECRET. These can be found/created using the google cloud console. ```text -$ export GOOGLE_KEY=your_google_client_id +export GOOGLE_KEY=your_google_client_id export GOOGLE_SECRET=your_google_secret_key ``` +After copying each code + ## Security Notes By default, gothic uses a `CookieStore` from the `gorilla/sessions` package to store session data. From 5ed846f66b57588ab4413c1749a6f5ece2e6dcd7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 06:02:08 +0530 Subject: [PATCH 5/9] formatting changes 4 iteration --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4142a6c..833382f5 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ Now open up your browser and go to [http://localhost:3000](http://localhost:3000 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 +Environment variables can be set using following command in the terminal ```text export key=value From e3e517c2eee0562a96c0cd24677bc207902255af Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 06:04:53 +0530 Subject: [PATCH 6/9] formatting changes 5 iteration --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 833382f5..ecf4022f 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ through Twitter, Facebook, Google Plus etc. To run the example use either of the methods below :: -1. Clone the source from GitHub - (copy and paste the whole command line block from below in the terminal) +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 @@ -101,7 +101,7 @@ To run the example use either of the methods below :: or use -2. Get the repository as a dependency - (copy and paste the whole command line block from below in the terminal) +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 From 78b88a3a68fbd66b09c2a9f19fb950e074f3a59e Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 06:07:36 +0530 Subject: [PATCH 7/9] formatting changes 6 iteration --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ecf4022f..bc55b903 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ Environment variables can be set using following command in the terminal export key=value ``` -For example, To set the environment variables for GOOGLE sign-in use where the respective value of the GOOGLE_KEY and GOOGLE_SECRET. These can be found/created using the google cloud console. +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. ```text export GOOGLE_KEY=your_google_client_id From ae34fb6e93d8d0bd640d3d3c7d6a7409777ac66d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 06:08:23 +0530 Subject: [PATCH 8/9] formatting changes 7 iteration --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index bc55b903..abdb5949 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,6 @@ export GOOGLE_KEY=your_google_client_id export GOOGLE_SECRET=your_google_secret_key ``` -After copying each code - ## Security Notes By default, gothic uses a `CookieStore` from the `gorilla/sessions` package to store session data. From 978042c0c23bc05724432b5e5d592d584dba428d Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jul 2024 06:12:07 +0530 Subject: [PATCH 9/9] formatting changes 8 iteration --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index abdb5949..49ef151a 100644 --- a/README.md +++ b/README.md @@ -105,12 +105,11 @@ or use ```text go get github.com/markbates/goth cd $GOPATH/pkg/mod/github.com/markbates/goth@v1.80.0/examples - cd goth/examples go get -v go build ./examples ``` - Note: The version of the goth `goth@v1.80.0` in the path above is subject to change in the future + 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.