Skip to content

Commit

Permalink
Merge pull request #94 from kodypeterson/fix-login-redirect
Browse files Browse the repository at this point in the history
Fix for login redirect not using APPLICATION_BASE
  • Loading branch information
superhawk610 committed Jul 9, 2021
2 parents d982265 + 6e15cf4 commit e7b023d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/configureApollo.ts
Expand Up @@ -7,7 +7,7 @@ import { WebSocketLink } from 'apollo-link-ws';
import { SubscriptionClient } from 'subscriptions-transport-ws';
import { getMainDefinition } from 'apollo-utilities';
import { getInjected } from './getInjected';
import { AUTH_TOKEN, COLORS } from './constants';
import { AUTH_TOKEN, COLORS, APPLICATION_BASE } from './constants';
import * as badge from 'console-badge';

const upstream = getInjected('upstream', '');
Expand Down Expand Up @@ -80,7 +80,7 @@ export function configureApolloClient() {

if (unauthorized && !window.location.pathname.match(/^\/login/)) {
localStorage.removeItem(AUTH_TOKEN);
window.location.replace('/login');
window.location.replace(`${APPLICATION_BASE}/login`);
}
}),
link,
Expand Down

0 comments on commit e7b023d

Please sign in to comment.