[U] fix redirect to login
This commit is contained in:
parent
e1875b27fd
commit
d3b9da0a8c
2 changed files with 2 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ export class SupaService {
|
|||
}
|
||||
|
||||
async getUserModel() {
|
||||
const user = await this.client.auth.user();
|
||||
const user = this.client.auth.user();
|
||||
if (user) {
|
||||
console.log('user', user);
|
||||
this.supabaseUserModel = user;
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ export class AuthGuard implements CanActivate {
|
|||
|
||||
/* Try to auth with the server. If authed resolve to true, else resolve to false */
|
||||
const user = this.supa.client.auth.user();
|
||||
console.warn('authguard: user', user);
|
||||
if (user) {
|
||||
return true;
|
||||
}
|
||||
this.router.navigateByUrl('/login');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue