Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

Commit 5be00cd

Browse files
author
Ignacio
committed
Added scope prop
1 parent 87356ae commit 5be00cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/providers/google.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
toQueryString,
2323
} from '../utils/uri';
2424

25-
const SCOPE = 'email profile';
25+
const SCOPE = 'email profile offline';
2626
const AUTH = 'https://accounts.google.com/o/oauth2/v2/auth';
2727
const TOKEN = 'https://www.googleapis.com/oauth2/v4/token';
2828
const ME = 'https://www.googleapis.com/oauth2/v2/userinfo';
@@ -45,13 +45,13 @@ const getUser = curry((request, credentials) => pipe(
4545
),
4646
)(credentials));
4747

48-
export const authorize = ({ dance, request }, { appId, callback }) =>
48+
export const authorize = ({ dance, request }, { appId, callback, scope = SCOPE }) =>
4949
pipeP(
5050
dance,
5151
fromQueryString,
5252
checkError,
5353
merge({ appId, callback }),
54-
)(authorizationUrl(AUTH, appId, callback, SCOPE, 'code'));
54+
)(authorizationUrl(AUTH, appId, callback, scope, 'code'));
5555

5656
export const identify = curry((request, { appId, callback, code }) =>
5757
pipeP(

0 commit comments

Comments
 (0)