From 97f968a8089a8c803daec5c951afe4d14f6bb03a Mon Sep 17 00:00:00 2001 From: Karim Hamidou Date: Fri, 19 Feb 2016 11:20:36 -0800 Subject: [PATCH] [auth] Change a Google OAuth parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Some of our users who reauth are getting weird errors from Google — it seems that in some cases Google OAuth doesn’t pass us a `refresh_token`, even though we ask for one by passing `approval_prompt=force` (I’ve landed a commit to log more details about this in edgehill-server —- https://github.com/nylas/edgehill-server/commit/6e984ffa268d8523b6f98be8532c4ebfaa2d1536 — but this won’t fix the problem). Apparently, Google recently « soft-deprecated » `approval_prompt` in favor of a new parameter called `prompt`, which does mostly the same thing (https://developers.google.com/identity/protocols/OAuth2WebServer#formingtheurl) This diff replaces `approval_prompt` by `prompt`. Test Plan: Tested by authing a Gmail account and checking that it worked. Reviewers: bengotow Reviewed By: bengotow Subscribers: emfree Differential Revision: https://phab.nylas.com/D2557 --- internal_packages/onboarding/lib/account-choose-page.cjsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal_packages/onboarding/lib/account-choose-page.cjsx b/internal_packages/onboarding/lib/account-choose-page.cjsx index ba52a0177..a5bc673ac 100644 --- a/internal_packages/onboarding/lib/account-choose-page.cjsx +++ b/internal_packages/onboarding/lib/account-choose-page.cjsx @@ -100,7 +100,7 @@ class AccountChoosePage extends React.Component https://mail.google.com/ \ https://www.google.com/m8/feeds \ https://www.googleapis.com/auth/calendar' - approval_prompt: 'force' + prompt: 'consent' }) {shell} = require 'electron' shell.openExternal(googleUrl)