refactor: don't try to delete the auth cookie

This commit is contained in:
Derrick Hammer 2024-03-17 09:41:52 -04:00
parent fd7fec8580
commit 245467155d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 0 additions and 11 deletions

View File

@ -78,10 +78,6 @@ export class PortalAuthProvider implements RequiredAuthProvider {
async logout(params: any): Promise<AuthActionResponse> {
let ret = await this.sdk.account().logout();
if (ret) {
const cookies = new Cookies();
cookies.remove('jwt');
}
return {success: ret, redirectTo: "/login"};
}
@ -90,18 +86,11 @@ export class PortalAuthProvider implements RequiredAuthProvider {
const ret = await this.sdk.account().ping();
if (!ret) {
const cookies = new Cookies();
cookies.remove('jwt');
}
return {authenticated: ret, redirectTo: ret ? undefined : "/login"};
}
async onError(error: any): Promise<OnErrorResponse> {
const cookies = new Cookies();
cookies.remove('jwt');
this.sdk.setAuthToken('');
return {logout: true};
}