OAuth2 / JWT / OpenID Connect for mocking auth... which isn't that different from doing it for real, actually. https://mock.pocketid.app
Go to file
AJ ONeal 5ff37be8c5 add some google oauth2 docs 2020-08-20 06:06:13 +00:00
cmd/mailer demo email verification 2020-05-13 09:41:03 +00:00
examples demo email verification 2020-05-13 09:41:03 +00:00
mockid wip: ready new-account for email and google verification 2020-08-20 06:06:13 +00:00
public prefer a dark mode 2020-08-20 06:06:13 +00:00
vendor wip: ready new-account for email and google verification 2020-08-20 06:06:13 +00:00
xkeypairs wip: ready new-account for email and google verification 2020-08-20 06:06:13 +00:00
.gitignore add mailgun test 2020-05-13 06:11:06 +00:00
.ignore add debug routes for PEM and DER private keys 2020-08-01 07:32:17 +00:00
LICENSE Initial commit 2019-08-01 06:14:31 +00:00
README.md add some google oauth2 docs 2020-08-20 06:06:13 +00:00
default.jwk.json switch to keypairs 2020-05-11 04:40:46 +00:00
go-test.sh add debug routes for PEM and DER private keys 2020-08-01 07:32:17 +00:00
go.mod wip: ready new-account for email and google verification 2020-08-20 06:06:13 +00:00
go.sum wip: ready new-account for email and google verification 2020-08-20 06:06:13 +00:00
mockid.go add seed for random key generator (tested) 2020-08-01 23:59:20 +00:00

README.md

go-mockid

OAuth2 / JWT / OpenID Connect for mocking auth... which isn't that different from doing it for real, actually.

Enabling Google OAuth2 (Mid-2020)

  1. Create an account at https://console.developers.google.com/apis/dashboard
  2. Go back to https://console.developers.google.com/apis/dashboard
  3. Create a New Project from the dropdown in the upper left that lists the current project name
  4. Give the project a name such as Example Web App and accept its generated ID
  5. Click "Create"

Add your test domain

  1. Go back to https://console.developers.google.com/apis/dashboard
  2. Select your new project from the upper-left drop-down
  3. Select Domain Verification from the left hand side of the screen
  4. Add your test domain (i.e. beta.example.com), but a domain that you actually own
  5. Select Verify Ownership
  6. Follow the specific instructions for adding a txt record to the subdomain you chose
  7. Add a collaborator / co-owner if you wish

Enable OAuth2

  1. Go back to https://console.developers.google.com/apis/dashboard
  2. Select OAuth consent screen
  3. Select External
  4. Complete the consent screen form

Create Google Credentials

  1. Go back to https://console.developers.google.com/apis/dashboard
  2. Select Credentials from the left sidebar
  3. Select OAuth ID
  4. Select Web Application
  5. Fill out the same test domain and test app name as before
  6. Save the ID and Secret to a place you won't forget (perhaps a .gitignored .env)