refactor: standardize theme colors, update UI components, and refine auth redirection logic
This commit is contained in:
@@ -43,6 +43,7 @@ export async function terminateAuthSession(options: TerminateOptions = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function initiateAuthSession(respLogin: any) {
|
export async function initiateAuthSession(respLogin: any) {
|
||||||
|
try {
|
||||||
const data = respLogin?.data ?? {};
|
const data = respLogin?.data ?? {};
|
||||||
const { token, id } = data;
|
const { token, id } = data;
|
||||||
const userProfile = lodash.omit(data, ['token']);
|
const userProfile = lodash.omit(data, ['token']);
|
||||||
@@ -79,4 +80,7 @@ export async function initiateAuthSession(respLogin: any) {
|
|||||||
const redirectTo = params.get('redirect');
|
const redirectTo = params.get('redirect');
|
||||||
|
|
||||||
window.location.replace(redirectTo ? decodeURIComponent(redirectTo) : '/app');
|
window.location.replace(redirectTo ? decodeURIComponent(redirectTo) : '/app');
|
||||||
|
} catch (error) {
|
||||||
|
throw error as any;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user