Skip to content

Setting up Google Authentication

Patrick Carlson edited this page Dec 2, 2017 · 5 revisions

You can allow users to use their existing Google accounts in Kort.

  1. Edit the app.js file and set allowGoogleAuth to true and set allowUserRegistration to true.

  2. Go to https://console.developers.google.com and create a project. Name it "Kort". Search for "credentials" and use the dropdown to create both an API key and an OAuth Client ID.

  3. On the Google site under OAuth 2 Client IDs, set the authorized Javascript origin. You can get there by clicking on the edit/pencil button. Either put in your domain name or IP address. e.g. https://127.0.0.1 if you're testing or mydomain.com if you are hosting this site. Enter something similar for the authorized redirect. e.g. http://127.0.0.1:3000/auth/google/callback.

  4. Copy the clientID and paste it into googleClientID in app.js.

  5. Copy the client secret and paste it into googleClientSecret in app.js. DO NOT SHARE THIS KEY!

  6. Set the first part of the googleCallBackURL based on your IP address or domain name.

  7. On the Google site, click Library on the left navigation and search for 'Google+ Library'. Click 'enable'.

  8. Restart node and you should see a Google login button as an option.

Clone this wiki locally