@authgate/browser 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -84,6 +84,10 @@ export type CurrentUser = {
84
84
  id: string;
85
85
  email: string;
86
86
  username: string;
87
+ /** Whether the user account is disabled */
88
+ disabled: boolean;
89
+ /** Account creation time (ISO 8601) */
90
+ created_at: string;
87
91
  };
88
92
  /**
89
93
  * Fetches the currently authenticated user's identity.
package/dist/index.js CHANGED
@@ -169,6 +169,9 @@ export async function getCurrentUser(opts) {
169
169
  catch {
170
170
  return null;
171
171
  }
172
+ if (res.status === 401) {
173
+ return null;
174
+ }
172
175
  if (!res.ok) {
173
176
  return null;
174
177
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/alexlup06-authgate/authgate-browser.git"
6
6
  },
7
- "version": "0.5.0",
7
+ "version": "0.5.1",
8
8
  "description": "Browser-side helpers for AuthGate (logout, CSRF forwarding)",
9
9
  "license": "MIT",
10
10
  "type": "module",