feat(oauth): Refactor platform parameter handling and improve logout redirection logic

This commit is contained in:
web@ppanel
2025-01-21 22:39:23 +07:00
parent aa6dda894b
commit 8346c85109
3 changed files with 22 additions and 12 deletions
+2 -1
View File
@@ -45,7 +45,8 @@ export function Logout() {
if (!isBrowser()) return;
cookies.remove('Authorization');
const pathname = location.pathname;
if (!['', '/', '/auth', '/tos', '/oauth'].includes(pathname)) {
console.log(pathname);
if (!['', '/', '/auth', '/tos'].includes(pathname) || !pathname.includes('/oauth/')) {
setRedirectUrl(location.pathname);
location.href = `/auth`;
}