mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-08 21:55:54 +08:00
[N1] Changes to allow running edgehill-server locally
Summary: This is mostly config changes. Test Plan: Tested the Google OAuth flow. Reviewers: bengotow, drew Reviewed By: bengotow, drew Differential Revision: https://phab.nylas.com/D2907
This commit is contained in:
parent
b0d332c2c1
commit
cba6ccc220
3 changed files with 9 additions and 2 deletions
|
@ -90,13 +90,19 @@ class AccountChoosePage extends React.Component
|
||||||
code = NylasEnv.config.get('invitationCode') || ''
|
code = NylasEnv.config.get('invitationCode') || ''
|
||||||
state = [provider.clientKey,@_base64url(provider.encryptionKey),@_base64url(provider.encryptionIv),code].join(',')
|
state = [provider.clientKey,@_base64url(provider.encryptionKey),@_base64url(provider.encryptionIv),code].join(',')
|
||||||
|
|
||||||
|
# Use a different app for production and development.
|
||||||
|
env = NylasEnv.config.get('env') || 'production'
|
||||||
|
google_client_id = '372024217839-cdsnrrqfr4d6b4gmlqepd7v0n0l0ip9q.apps.googleusercontent.com'
|
||||||
|
if env != 'production'
|
||||||
|
google_client_id = '529928329786-e5foulo1g9kiej2h9st9sb0f4dt96s6v.apps.googleusercontent.com'
|
||||||
|
|
||||||
googleUrl = url.format({
|
googleUrl = url.format({
|
||||||
protocol: 'https'
|
protocol: 'https'
|
||||||
host: 'accounts.google.com/o/oauth2/auth'
|
host: 'accounts.google.com/o/oauth2/auth'
|
||||||
query:
|
query:
|
||||||
response_type: 'code'
|
response_type: 'code'
|
||||||
state: state
|
state: state
|
||||||
client_id: '372024217839-cdsnrrqfr4d6b4gmlqepd7v0n0l0ip9q.apps.googleusercontent.com'
|
client_id: google_client_id
|
||||||
redirect_uri: "#{EdgehillAPI.APIRoot}/oauth/google/callback"
|
redirect_uri: "#{EdgehillAPI.APIRoot}/oauth/google/callback"
|
||||||
access_type: 'offline'
|
access_type: 'offline'
|
||||||
scope: 'https://www.googleapis.com/auth/userinfo.email \
|
scope: 'https://www.googleapis.com/auth/userinfo.email \
|
||||||
|
|
|
@ -11,7 +11,7 @@ class TokenAuthAPI
|
||||||
_onConfigChanged: =>
|
_onConfigChanged: =>
|
||||||
env = NylasEnv.config.get('env')
|
env = NylasEnv.config.get('env')
|
||||||
if env is 'development'
|
if env is 'development'
|
||||||
@APIRoot = "http://localhost:6001"
|
@APIRoot = "http://localhost:5000"
|
||||||
else if env in ['experimental', 'staging']
|
else if env in ['experimental', 'staging']
|
||||||
@APIRoot = "https://invite-staging.nylas.com"
|
@APIRoot = "https://invite-staging.nylas.com"
|
||||||
else
|
else
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"name": "thread-snooze",
|
"name": "thread-snooze",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"appId": {
|
"appId": {
|
||||||
|
"development": "4iyhn0iqje4n9nkn8iaoyke30",
|
||||||
"staging": "2bfvqp9ylcl1az76od31qmny",
|
"staging": "2bfvqp9ylcl1az76od31qmny",
|
||||||
"production": "86bu9juw5bjeq1c8y2679aary"
|
"production": "86bu9juw5bjeq1c8y2679aary"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue