Commit 08655775 authored by Oleksii Savran's avatar Oleksii Savran
Browse files

Fix: "API error" if user try open profile after cancellation of registration.

parent 6b5ea165
......@@ -134,13 +134,13 @@ export function saveCookies(resp, expireOn: number, apiUrl: string) {
if (resp.refresh_token) {
cookies.set('refresh_token', resp.refresh_token, {domain, path: '/', expires: expDate });
} else {
cookies.remove('refresh_token');
document.cookie = 'refresh_token=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
}
}
export function clearCookies() {
log('Clearing cookies');
['authorities', 'access_token', 'refresh_token'].forEach((key) => cookies.remove(key));
['authorities', 'access_token', 'refresh_token'].forEach((key) => document.cookie = `${key}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`);
}
export function isNumeric(value: any): boolean {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment