in app/lib/githubService.ts [120:139]
static async getAuthenticationStatus(): Promise<AuthenticationStatus> {
if (!this.isAuthenticated()) {
return { isAuthenticated: false };
}
try {
const user = await this.getAuthenticatedUser();
const rateLimit = await this.getRateLimit();
return {
isAuthenticated: true,
user: user || undefined,
scopes: this.authScopes.length > 0 ? this.authScopes : undefined,
rateLimit,
};
} catch (error) {
console.warn("Failed to get authentication status:", error);
return { isAuthenticated: true }; // Token exists but might have limited info
}
}