8000 updated popup method to support google refresh tokens · sparkyfen/sdk-node-tutorial@e40d664 · GitHub
[go: up one dir, main page]

Skip to content

Commit e40d664

Browse files
committed
updated popup method to support google refresh tokens
1 parent b53880d commit e40d664

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

public/src/script.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ function retrieve_token(callback) {
1515
}
1616

1717
function authenticate(token, callback) {
18-
OAuth.popup('facebook', {
19-
state: token
18+
OAuth.popup('google', {
19+
state: token,
20+
// Google requires the following field
21+
// to get a refresh token
22+
authorize: {
23+
approval_prompt: 'force'
24+
}
2025
})
2126
.done(function(r) {
2227
$.ajax({

0 commit comments

Comments
 (0)
0