@drmhse/authos-react 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/README.md +22 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -157,6 +157,13 @@ function Profile() {
157
157
  }
158
158
  ```
159
159
 
160
+ **Returns:**
161
+ | Property | Type | Description |
162
+ |----------|------|-------------|
163
+ | `client` | `SsoClient` | The AuthOS SDK client |
164
+ | `isLoading` | `boolean` | True while checking auth state |
165
+ | `isAuthenticated` | `boolean` | True if user is logged in |
166
+
160
167
  ### useUser
161
168
 
162
169
  Get the current user's profile.
@@ -172,6 +179,12 @@ function UserProfile() {
172
179
  }
173
180
  ```
174
181
 
182
+ **Returns:**
183
+ | Property | Type | Description |
184
+ |----------|------|-------------|
185
+ | `user` | `UserProfile \| null` | Current user profile |
186
+ | `isLoading` | `boolean` | True while checking auth state |
187
+
175
188
  ### useOrganization
176
189
 
177
190
  Get the current organization and list of organizations.
@@ -195,6 +208,14 @@ function OrgInfo() {
195
208
  }
196
209
  ```
197
210
 
211
+ **Returns:**
212
+ | Property | Type | Description |
213
+ |----------|------|-------------|
214
+ | `currentOrganization` | `Organization \| null` | Current organization |
215
+ | `organizations` | `Organization[]` | All user's organizations |
216
+ | `switchOrganization` | `(slug: string) => Promise<void>` | Switch to a different org |
217
+ | `isSwitching` | `boolean` | True while switching |
218
+
198
219
  ### usePermission, useAnyPermission, useAllPermissions
199
220
 
200
221
  Check user permissions.
@@ -243,7 +264,7 @@ export default async function Dashboard() {
243
264
 
244
265
  | Prop | Type | Default | Description |
245
266
  |------|------|---------|-------------|
246
- | `config.baseURL` | `string` | **required** | AuthOS API URL |
267
+ | `config.baseURL` | `string` | **required** | AuthOS API URL (e.g., `https://sso.example.com`) |
247
268
  | `config.storage` | `TokenStorage` | `localStorage` | Custom token storage |
248
269
  | `config.autoRefresh` | `boolean` | `true` | Auto-refresh expired tokens |
249
270
  | `config.onAuthStateChange` | `(user) => void` | - | Callback when auth state changes |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drmhse/authos-react",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "React and Next.js adapter for AuthOS authentication",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",