fix issues
This commit is contained in:
@@ -62,7 +62,9 @@ export class AuthGateway {
|
||||
return {
|
||||
canAccess: this.canAccess(),
|
||||
reason: this.blocker.getBlockMessage(),
|
||||
isLoading: reason === 'loading',
|
||||
// Only show loading if auth context is still loading
|
||||
// If auth context is done but session is null, that's unauthenticated (not loading)
|
||||
isLoading: this.authContext.loading,
|
||||
isAuthenticated: this.authContext.session?.isAuthenticated ?? false,
|
||||
};
|
||||
}
|
||||
@@ -137,4 +139,11 @@ export class AuthGateway {
|
||||
getBlockReason(): string {
|
||||
return this.blocker.getReason();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user-friendly block message
|
||||
*/
|
||||
getBlockMessage(): string {
|
||||
return this.blocker.getBlockMessage();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user