-
Notifications
You must be signed in to change notification settings - Fork 9
Setting up Google Authentication
You can allow users to use their existing Google accounts in Kort.
-
Edit the
app.js
file and setallowGoogleAuth
totrue
. -
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.
-
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 ormydomain.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
. -
Copy the clientID and paste it into
googleClientID
inapp.js
. -
Copy the client secret and paste it into
googleClientSecret
inapp.js
. DO NOT SHARE THIS KEY! -
Set the first part of the
googleCallBackURL
based on your IP address or domain name. -
On the Google site, click Library on the left navigation and search for 'Google+ Library'. Click 'enable'.
-
Restart node and you should see a Google login button as an option.