fix(#169): auth api fix

test-j
Rakov Roman 3 years ago
parent 135f2c2152
commit 4c7a7e4865
  1. 4
      src/features/AuthServiceApp/components/Oauth/index.tsx
  2. 4
      src/features/AuthStore/helpers.tsx

@ -10,7 +10,7 @@ import type { Settings } from 'features/AuthStore/helpers'
import { getClientSettings } from 'features/AuthStore/helpers' import { getClientSettings } from 'features/AuthStore/helpers'
import { T9n } from 'features/T9n' import { T9n } from 'features/T9n'
import { API_ROOT } from '../../config/routes' import { getApiUrl } from 'features/AuthServiceApp/config/routes'
import { PAGES } from '../../config/pages' import { PAGES } from '../../config/pages'
import { useOauth } from './hooks' import { useOauth } from './hooks'
import { import {
@ -28,7 +28,7 @@ import {
Error, Error,
} from './styled' } from './styled'
const url = `${API_ROOT}/oauth` const url = getApiUrl('/oauth')
const Oauth = () => { const Oauth = () => {
const { const {

@ -6,6 +6,8 @@ import { AUTH_SERVICE } from 'config/routes'
import { ClientIds, ClientNames } from 'config/clients/types' import { ClientIds, ClientNames } from 'config/clients/types'
import { ENV, stageENV } from 'config/env' import { ENV, stageENV } from 'config/env'
import { API_ROOT } from 'features/AuthServiceApp/config/routes'
export interface Settings extends UserManagerSettings { export interface Settings extends UserManagerSettings {
client_id: ClientIds, client_id: ClientIds,
lang?: string, lang?: string,
@ -48,7 +50,7 @@ export const getClientSettings = (): Settings => ({
client_id: client.auth.clientId, client_id: client.auth.clientId,
filterProtocolClaims: false, filterProtocolClaims: false,
loadUserInfo: false, loadUserInfo: false,
metadataUrl: `https://api.auth.test.insports.tv/.well-known/openid-configuration${client.auth.metaDataUrlParams || ''}`, metadataUrl: `${API_ROOT}/.well-known/openid-configuration${client.auth.metaDataUrlParams || ''}`,
redirect_uri: redirectUrl(), redirect_uri: redirectUrl(),
response_mode: 'query', response_mode: 'query',
response_type: 'id_token token', response_type: 'id_token token',

Loading…
Cancel
Save