Skip to content

Commit

Permalink
fix: revert browser check
Browse files Browse the repository at this point in the history
  • Loading branch information
aaa006bd committed Aug 14, 2023
1 parent 2303ec8 commit 3a25608
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions composables/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ export const useAuth = () => {
}>();

function login(forgeId: number) {
if(process.browser){
window.location.href = `/api/auth/login?forgeId=${forgeId}`;
}
window.location.href = `/api/auth/login?forgeId=${forgeId}`;

}

function logout() {
if(process.browser){
window.location.href = '/api/auth/logout';
}
window.location.href = '/api/auth/logout';
}

if (token.value) {
Expand Down

0 comments on commit 3a25608

Please sign in to comment.