Skip to content

Instantly share code, notes, and snippets.

@rik
Created February 5, 2014 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rik/8828236 to your computer and use it in GitHub Desktop.
Save rik/8828236 to your computer and use it in GitHub Desktop.
apps/communications/contacts/oauth2/js/flow.js | 3 ++-
apps/communications/contacts/oauth2/js/oauth20.js | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/apps/communications/contacts/oauth2/js/flow.js b/apps/communications/contacts/oauth2/js/flow.js
index 3bb4e27..7afa5ac 100644
--- a/apps/communications/contacts/oauth2/js/flow.js
+++ b/apps/communications/contacts/oauth2/js/flow.js
@@ -83,7 +83,8 @@ if (typeof window.oauthflow === 'undefined') {
'redirect_uri=' + redirect_uri,
'response_type=token',
'scope=' + scopeParam,
- 'state=' + state
+ 'state=' + state,
+ 'approval_prompt=force'
]; // Query params
var query = queryParams.join('&');
diff --git a/apps/communications/contacts/oauth2/js/oauth20.js b/apps/communications/contacts/oauth2/js/oauth20.js
index d8c2578..26399a0 100644
--- a/apps/communications/contacts/oauth2/js/oauth20.js
+++ b/apps/communications/contacts/oauth2/js/oauth20.js
@@ -62,10 +62,10 @@ if (typeof window.oauth2 === 'undefined') {
asyncStorage.getItem(getKey(service),
function getAccessToken(tokenData) {
- if (!tokenData || !tokenData.access_token) {
+ // if (!tokenData || !tokenData.access_token) {
startOAuth(state, service);
return;
- }
+ // }
var access_token = tokenData.access_token;
var expires = Number(tokenData.expires);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment