mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 00:59:09 +00:00
update login flow to prevent session leakage
This commit is contained in:
parent
be826b613e
commit
1cb04c8b5a
4 changed files with 41 additions and 30 deletions
|
@ -9,10 +9,7 @@ import { seeOther } from '@roleypoly/api/src/utils/response';
|
|||
import { AuthTokenResponse, StateSession } from '@roleypoly/types';
|
||||
|
||||
const authFailure = (uiPublicURI: string, extra?: string) =>
|
||||
seeOther(
|
||||
uiPublicURI +
|
||||
`/machinery/error?error_code=authFailure${extra ? `&extra=${extra}` : ''}`
|
||||
);
|
||||
seeOther(uiPublicURI + `/error/authFailure${extra ? `?extra=${extra}` : ''}`);
|
||||
|
||||
export const authCallback: RoleypolyHandler = async (
|
||||
request: Request,
|
||||
|
@ -72,5 +69,5 @@ export const authCallback: RoleypolyHandler = async (
|
|||
return authFailure(config.uiPublicURI, 'session setup failure');
|
||||
}
|
||||
|
||||
return seeOther(bounceBaseUrl + 'machinery/new-session/' + session.sessionID);
|
||||
return seeOther(bounceBaseUrl + 'machinery/new-session/#/' + session.sessionID);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue