fix(#2519): add new condition for lff auth

keep-around/113c51b90ad0d95601e028ddb67e5e18f0acf6ac
Andrei Dekterev 4 years ago
parent 5981b25821
commit 113c51b90a
  1. 14
      src/features/AuthStore/helpers.tsx
  2. 2
      src/react-app-env.d.ts

@ -30,14 +30,14 @@ const getClientNameByRedirectUri = () => {
const redirectUrl = () => { const redirectUrl = () => {
const clientName = getClientNameByRedirectUri() const clientName = getClientNameByRedirectUri()
switch (true) {
if (process.env.NODE_ENV === 'development') { case (process.env.NODE_ENV === 'development' || client.name === 'lff'):
return `${window.origin}/redirect` return `${window.origin}/redirect`
} case (ENV === 'staging' || ENV === 'preproduction'):
if (ENV === 'staging' || ENV === 'preproduction') { return `https://${stageENV}.instat.tv/redirect`
return `https://${stageENV}.instat.tv/redirect` default:
return `https://${clientName}.tv/redirect`
} }
return `https://${clientName}.tv/redirect`
} }
export const getClientSettings = (): Settings => ({ export const getClientSettings = (): Settings => ({

@ -5,7 +5,7 @@ declare namespace NodeJS {
export interface ProcessEnv { export interface ProcessEnv {
REACT_APP_CLIENT: 'instat' | 'facr' | 'lff', REACT_APP_CLIENT: 'instat' | 'facr' | 'lff',
REACT_APP_ENV: 'production' | 'preproduction' | 'staging', REACT_APP_ENV: 'production' | 'preproduction' | 'staging',
REACT_APP_STAGE: 'staging' | 'a-staging' | 'b-staging' | 'c-staging' | 'd-staging' | 'e-staging', REACT_APP_STAGE: 'staging' | 'a-staging' | 'b-staging' | 'c-staging' | 'd-staging' | 'e-staging' | 'f-staging' | 'g-staging' | 'h-staging' | 'i-staging',
REACT_APP_TYPE: 'auth-service' | 'ott', REACT_APP_TYPE: 'auth-service' | 'ott',
} }
} }

Loading…
Cancel
Save