You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `clientId` | `string` | Yes | Your WorkOS Client ID (starts with `client_`) |
108
-
| `apiHostname` | `string` | No | Your custom Authentication API domain. Defaults to api.workos.com. In production, this should be set to a domain you own (e.g. auth.example.com) |
109
-
| `devMode` | `boolean` | No | Stores tokens in localStorage. Auto-enabled on `localhost` and `127.0.0.1`. |
110
-
| `onRedirectCallback` | `(params) =>void` | No | Called after a successful authentication. Use to restore app state or navigate. |
111
-
| `onRefresh` | `(response) =>void` | No | Called when the access token is refreshed. |
112
-
| `onRefreshFailure` | `({ signIn }) =>void` | No | Called when token refresh fails. Receives `signIn` to trigger re-authentication. |
113
-
| `onBeforeAutoRefresh` | `() => boolean` | No | Called before automatic refresh. Return `false` to skip. |
114
-
| `refreshBufferInterval` | `number` | No | Seconds before token expiration to trigger refresh. |
| `clientId`| `string`| Yes | Your WorkOS Client ID (starts with `client_`) |
108
+
| `apiHostname`| `string` | No | Your custom Authentication API domain. Defaults to api.workos.com. In production, this should be set to a domain you own (e.g. auth.example.com) |
109
+
| `devMode` | `boolean` | No | Stores tokens in localStorage. Auto-enabled on `localhost` and `127.0.0.1`. |
110
+
| `onRedirectCallback` | `(params) =>void` | No | Called after a successful authentication. Use to restore app state or navigate. |
111
+
| `onRefresh` | `(response) =>void` | No | Called when the access token is refreshed. |
112
+
| `onRefreshFailure` | `({ signIn }) =>void` | No | Called when token refresh fails. Receives `signIn` to trigger re-authentication. |
113
+
| `onBeforeAutoRefresh` | `() => boolean` | No | Called before automatic refresh. Return `false` to skip. |
114
+
| `refreshBufferInterval` | `number` | No | Seconds before token expiration to trigger refresh. |
115
115
116
116
### `useAuth()`
117
117
118
118
Returns the current auth state and helper methods. Must be called inside `<AuthKitProvider>`.
0 commit comments