Auth with Google and use APIs.
- create a project in console.developers.google.com
- in project, create OAuth credentials and fill:
- 'Authorized JavaScript origins' with
http://localhost:3000
and<production-domain>
- 'Authorized redirect URIs' with
http://localhost:3000/authcallback
and<production-domain>/authcallback
- 'Authorized JavaScript origins' with
- create
.env
file with following entries from the credentials:CLIENT_ID
,CLIENT_SECRET
,REDIRECT_URL
- run server locally -
$ npm run start
using OAuth2 Google library, creds are stored in cookies
because of how Google OAuth works you can only be logged in on local or production version at a given time
(revoke access here if it auth trouble)