File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -609,6 +609,10 @@ export enum PAGE_ROUTE {
609
609
ACCOUNT_ACTIVE_TRIAL_FINISH = '/account/active-trial/finish' ,
610
610
}
611
611
612
+ export enum API_ROUTE {
613
+ AUTHENTICATE = '/api/authenticate' ,
614
+ }
615
+
612
616
export enum TABLE_COLUMN_KEY {
613
617
HUGO_SYMBOL = 'HUGO_SYMBOL' ,
614
618
ALTERATION = 'ALTERATION' ,
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
23
23
getPublicWebsiteToken ,
24
24
getStoredRecaptchaToken ,
25
25
} from 'app/indexUtils' ;
26
- import { UNAUTHORIZED_ALLOWED_PATH } from 'app/config/constants' ;
26
+ import { API_ROUTE , UNAUTHORIZED_ALLOWED_PATH } from 'app/config/constants' ;
27
27
import { AppConfig , AppProfile } from 'app/appConfig' ;
28
28
29
29
assignPublicToken ( ) ;
@@ -79,6 +79,8 @@ superagent.Request.prototype.end = function (callback) {
79
79
AppConfig . serverConfig . token &&
80
80
AppConfig . serverConfig . appProfile === AppProfile . PROD &&
81
81
response . req &&
82
+ // we do not reload the page when the /api/authenticate failed
83
+ response . req . url !== API_ROUTE . AUTHENTICATE &&
82
84
UNAUTHORIZED_ALLOWED_PATH . some ( path =>
83
85
window . location . pathname . endsWith ( path )
84
86
)
You can’t perform that action at this time.
0 commit comments