Required changes for refreshing access tokens.

This commit is contained in:
Karim Hamidou 2016-12-15 12:25:52 -08:00
parent f34a8f8f0a
commit cb6f761df3
2 changed files with 3 additions and 0 deletions

View file

@ -60,6 +60,7 @@ export function makeGmailOAuthRequest(sessionKey, callback) {
provider: 'gmail',
settings: {
xoauth2: remoteJSON.resolved_settings.xoauth2,
expiry_date: remoteJSON.resolved_settings.expiry_date,
},
},
success: (localJSON) => {

View file

@ -10,6 +10,8 @@ class N1CloudAPI {
const env = NylasEnv.config.get('env')
if (['development', 'local'].includes(env)) {
this.APIRoot = "http://localhost:5100";
} else if (env === 'staging') {
this.APIRoot = "https://n1-staging.us-east-1.elasticbeanstalk.com/";
} else {
this.APIRoot = "https://n1.nylas.com";
}