Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
HOST=crick.dev
SCHEME=http
REACT_APP_API_HOST=http://api.crick.dev:8000
REACT_APP_AUTH0_DOMAIN=crick.eu.auth0.com
REACT_APP_AUTH0_CLIENT_ID=D3n8NUUheqsktqGUx12avbWNjCHakTLT
Expand Down
1 change: 1 addition & 0 deletions web/.env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
HOST=app.crick.io
SCHEME=https
REACT_APP_API_HOST=https://api.crick.io
REACT_APP_AUTH0_DOMAIN=crick.eu.auth0.com
REACT_APP_AUTH0_CLIENT_ID=ug8XCqaHUNLS7zHNdPv6l7fyGbIT2Nqc
Expand Down
5 changes: 5 additions & 0 deletions web/src/Auth/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export type AuthState = {
isAuthenticated: boolean,
};

const redirectUrl = process.env.SCHEME && process.env.HOST
? `${process.env.SCHEME}://${process.env.HOST}/`
: '';

const lock = new Auth0Lock(
process.env.REACT_APP_AUTH0_CLIENT_ID,
process.env.REACT_APP_AUTH0_DOMAIN,
Expand All @@ -24,6 +28,7 @@ const lock = new Auth0Lock(
params: {
scope: 'openid profile',
audience: process.env.REACT_APP_AUTH0_AUDIENCE,
redirectUrl,
responseType: 'token',
},
},
Expand Down