diff --git a/frontend/app/common/api.ts b/frontend/app/common/api.ts index d89c053d..5b4e32d3 100644 --- a/frontend/app/common/api.ts +++ b/frontend/app/common/api.ts @@ -6,7 +6,7 @@ import fetcher from './fetcher'; /* common */ const __loginAnonymously = (username: string): Promise => { - const url = `/auth/anonymous/login?user=${encodeURIComponent(username)}&aud=${siteId}?from=${encodeURIComponent( + const url = `/auth/anonymous/login?user=${encodeURIComponent(username)}&aud=${siteId}&from=${encodeURIComponent( location.origin + location.pathname + '?selfClose' )}`; return fetcher.get({ url, withCredentials: true, overriddenApiBase: '' });