diff --git a/src/client.ts b/src/client.ts index 5976b12..0cab965 100644 --- a/src/client.ts +++ b/src/client.ts @@ -329,21 +329,9 @@ export class StuffleIAMClient { } /** - * Get current user from stored userinfo or ID token - * Prefers stored userinfo (from fetchUserInfo) as it has more claims like username + * Get current user from stored ID token */ getUser(): User | null { - // First try stored userinfo (has username and other claims from /userinfo endpoint) - const storedUser = this.storage.get(STORAGE_KEYS.USER); - if (storedUser) { - try { - return JSON.parse(storedUser) as User; - } catch { - // Fall through to ID token - } - } - - // Fallback to ID token (may not have all claims like username) const idToken = this.storage.get(STORAGE_KEYS.ID_TOKEN); if (!idToken) return null;