Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
baseUrl | string | - | packages/modelence/src/client/clientConfig.ts:4 |
credentials? | RequestCredentials | Credentials mode for method-call requests. Defaults to 'include', which browser apps need for the cookie-based flows (password reset, magic link). Clients configured with token-in-body auth (React Native / Expo) never use cookies, so set 'omit' there — on Expo Web a credentialed cross-origin request is otherwise blocked by any server answering Access-Control-Allow-Origin: *, surfacing as “TypeError: Failed to fetch”. | packages/modelence/src/client/clientConfig.ts:31 |
getAuthToken | () => undefined | string | - | packages/modelence/src/client/clientConfig.ts:5 |
getClientInfo | () => ClientInfo | - | packages/modelence/src/client/clientConfig.ts:7 |
openUrl? | (url) => unknown | Opens a URL for OAuth redirects. React Native must use (url) => Linking.openURL(url) — WebView is not supported. Defaults to window.location.href when not provided. A web client that opens the flow in a popup should return the window window.open gave it: (url) => window.open(url). With that reference the callback page in the popup can hand the sign-in code back to this page, which then completes the login in its own context — what makes OAuth work when the app runs inside a cross-origin iframe and the popup’s storage is partitioned away from it. Any other return value (including the Promise from Linking.openURL) is ignored. | packages/modelence/src/client/clientConfig.ts:21 |
setAuthToken | (token) => void | - | packages/modelence/src/client/clientConfig.ts:6 |