refactor(1803): added auth service staging route (#555)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 4 years ago
parent 94977f3df1
commit 369eb8fff5
  1. 7
      src/config/routes.tsx
  2. 7
      src/features/AuthStore/helpers.tsx
  3. 4
      src/features/UserAccount/components/PersonalInfoForm/index.tsx

@ -1,10 +1,17 @@
import { ENV } from './env'
const AUTH_SERVICE_URLS = {
preproduction: 'https://test-auth.instat.tv',
production: 'https://auth.instat.tv',
staging: 'https://test-auth.instat.tv',
}
const APIS = {
preproduction: 'https://api-test.instat.tv',
production: 'https://api.instat.tv',
staging: 'https://api-staging.instat.tv',
}
export const AUTH_SERVICE = AUTH_SERVICE_URLS[ENV]
export const API_ROOT = APIS[ENV]
export const DATA_URL = `${API_ROOT}/data`

@ -2,16 +2,15 @@ import type { UserManagerSettings } from 'oidc-client'
import { WebStorageStateStore } from 'oidc-client'
import { client } from 'config/clients'
export const AUTH_PROVIDER_URL = 'https://auth.instat.tv'
import { AUTH_SERVICE } from 'config/routes'
export const getClientSettings = (): UserManagerSettings => ({
authority: AUTH_PROVIDER_URL,
authority: AUTH_SERVICE,
automaticSilentRenew: true,
client_id: client.auth.clientId,
filterProtocolClaims: false,
loadUserInfo: false,
metadataUrl: `${AUTH_PROVIDER_URL}/.well-known/openid-configuration${client.auth.metaDataUrlParams || ''}`,
metadataUrl: `${AUTH_SERVICE}/.well-known/openid-configuration${client.auth.metaDataUrlParams || ''}`,
redirect_uri: `${window.origin}/redirect`,
response_mode: 'query',
response_type: 'id_token token',

@ -1,6 +1,6 @@
import { formIds } from 'config/form'
import { AUTH_SERVICE } from 'config/routes'
import { AUTH_PROVIDER_URL } from 'features/AuthStore/helpers'
import { Combobox } from 'features/Combobox'
import { Input } from 'features/Common'
import { T9n } from 'features/T9n'
@ -111,7 +111,7 @@ export const PersonalInfoForm = (props: Props) => {
</ButtonWrapper>
<PrivacyPolicyLink
target='_blank'
href={`${AUTH_PROVIDER_URL}/terms-and-conditions`}
href={`${AUTH_SERVICE}/terms-and-conditions`}
>
<T9n t='privacy_policy_and_statement' />
</PrivacyPolicyLink>

Loading…
Cancel
Save