mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 02:03:07 +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') || ''
|
||||
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({
|
||||
protocol: 'https'
|
||||
host: 'accounts.google.com/o/oauth2/auth'
|
||||
query:
|
||||
response_type: 'code'
|
||||
state: state
|
||||
client_id: '372024217839-cdsnrrqfr4d6b4gmlqepd7v0n0l0ip9q.apps.googleusercontent.com'
|
||||
client_id: google_client_id
|
||||
redirect_uri: "#{EdgehillAPI.APIRoot}/oauth/google/callback"
|
||||
access_type: 'offline'
|
||||
scope: 'https://www.googleapis.com/auth/userinfo.email \
|
||||
|
|
|
@ -11,7 +11,7 @@ class TokenAuthAPI
|
|||
_onConfigChanged: =>
|
||||
env = NylasEnv.config.get('env')
|
||||
if env is 'development'
|
||||
@APIRoot = "http://localhost:6001"
|
||||
@APIRoot = "http://localhost:5000"
|
||||
else if env in ['experimental', 'staging']
|
||||
@APIRoot = "https://invite-staging.nylas.com"
|
||||
else
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"name": "thread-snooze",
|
||||
"version": "1.0.0",
|
||||
"appId": {
|
||||
"development": "4iyhn0iqje4n9nkn8iaoyke30",
|
||||
"staging": "2bfvqp9ylcl1az76od31qmny",
|
||||
"production": "86bu9juw5bjeq1c8y2679aary"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue