Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Google passportjs scope fix #67

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Have a look at the /config folder for more details, but the general parameters a
```sh
export WATCHMEN_BASE_URL='http://watchmen.letsnode.com'
export WATCHMEN_WEB_PORT='8080'
export WATCHMEN_ADMINS='[email protected]'
export [email protected]
export WATCHMEN_GOOGLE_ANALYTICS_ID='your-GA-ID'
```

Expand All @@ -168,8 +168,8 @@ export WATCHMEN_BASE_URL='http://watchmen.letsnode.com/'
You will also need to set the Google client ID and secret using ``env`` variables accordingly. (Login into https://console.developers.google.com/ to create them first)

```sh
export WATCHMEN_GOOGLE_CLIENT_ID='<your key>'
export WATCHMEN_GOOGLE_CLIENT_SECRET='<your secret>'
export WATCHMEN_GOOGLE_CLIENT_ID=<your key>
export WATCHMEN_GOOGLE_CLIENT_SECRET=<your secret>
```

## Disabling authentication
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# Basic configuration
WATCHMEN_BASE_URL='http://localhost:3000'
WATCHMEN_WEB_PORT=3000
WATCHMEN_ADMINS='[email protected]'
[email protected]
WATCHMEN_GOOGLE_ANALYTICS_ID='your-GA-ID'

# Google OAuth configuration
WATCHMEN_GOOGLE_CLIENT_ID=''
WATCHMEN_GOOGLE_CLIENT_SECRET=''
WATCHMEN_GOOGLE_CLIENT_ID=
WATCHMEN_GOOGLE_CLIENT_SECRET=

# Ignore Unauthorized SSL certificates
NODE_TLS_REJECT_UNAUTHORIZED=0
Expand Down
2 changes: 1 addition & 1 deletion webserver/routes/web-auth-route.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = (function (){
app.use(passport.session());

app.get('/auth/google', passport.authenticate('google', {
scope: 'https://www.google.com/m8/feeds https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile'
scope: ['profile', 'email', 'https://www.google.com/m8/feeds']
}));

app.get('/auth/google/callback', passport.authenticate('google', {
Expand Down