Google

Go to the Google Developer Dashboard and create a new project.

../_images/google-01.svg

Give it a name.

../_images/google-02.png

Select the project in the top left next to the GoogleAPIs logo. Click “Credentials” under the menu on the left of the screen.

../_images/google-03.svg

Click “Create credentials”:

../_images/google-04.svg

Select “Web Application”. Give it a name. Then fill in the Javascript origins:

and authorized redirects:

../_images/google-05.png

Then click “create” and copy out the client id and secret from the popup.

../_images/google-06.png

The client id is also available on the dashboard after you create it:

../_images/google-07.png

Note

We add three authorized domains for different testing scenarios. The 8081 port will be the raw service. 8080 will be an nginx reverse proxy listening over unencrypted http. 8443 will be an nginx reverse proxy listening over encrypted https (with a self-signed certificate).

Note

As of January 2019 Google has recently changed their developer settings and requirements for OAUTH access. They used to allow localhost and now they do not. An alternative is to use lvh.me which currently resolves through DNS to 127.0.0.1. Be careful, however, as this is a common solution cited on the interwebs but no one seems to know who controls this domain and they may be nefarious actors.

For deployment you’ll want to add a redirect like this:

https://server.yoursite.com/auth/callback?provider=google