@kivacore/signin 0.21.1 → 0.21.2

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/README.md CHANGED
@@ -60,7 +60,7 @@ import { KivaAuthProvider, useKivaAuth, useKivaClient, SignInButton } from '@kiv
60
60
  function App() {
61
61
  return (
62
62
  <KivaAuthProvider
63
- apiUrl="https://alpha-api.docyrus.com"
63
+ apiUrl="https://api.kiva.app"
64
64
  clientId="your-oauth2-client-id"
65
65
  redirectUri="http://localhost:3000/callback"
66
66
  scopes={['offline_access', 'Read.All', 'Users.Read']}
@@ -100,7 +100,7 @@ import { KivaAuthProvider } from '@kivacore/signin/vue';
100
100
 
101
101
  <template>
102
102
  <KivaAuthProvider
103
- apiUrl="https://alpha-api.docyrus.com"
103
+ apiUrl="https://api.kiva.app"
104
104
  clientId="your-oauth2-client-id"
105
105
  redirectUri="http://localhost:5173/callback"
106
106
  :scopes="['offline_access', 'Read.All', 'Users.Read']"
@@ -139,7 +139,7 @@ const tokenStorage = new ElectronTokenStorage();
139
139
  function App() {
140
140
  return (
141
141
  <KivaAuthProvider
142
- apiUrl="https://alpha-api.docyrus.com"
142
+ apiUrl="https://api.kiva.app"
143
143
  clientId="your-oauth2-client-id"
144
144
  redirectUri="kiva://callback"
145
145
  scopes={['offline_access', 'Read.All', 'Users.Read']}
@@ -226,7 +226,7 @@ Pass props to `KivaAuthProvider` to override defaults:
226
226
 
227
227
  ```tsx
228
228
  <KivaAuthProvider
229
- apiUrl="https://alpha-api.docyrus.com"
229
+ apiUrl="https://api.kiva.app"
230
230
  clientId="your-oauth2-client-id"
231
231
  redirectUri="http://localhost:3000/callback"
232
232
  scopes={['offline_access', 'Read.All', 'Users.Read']}
@@ -239,7 +239,7 @@ Pass props to `KivaAuthProvider` to override defaults:
239
239
 
240
240
  | Prop | Type | Default | Description |
241
241
  |------|------|---------|-------------|
242
- | `apiUrl` | `string` | `https://alpha-api.docyrus.com` | Kiva API base URL |
242
+ | `apiUrl` | `string` | `https://api.kiva.app` | Kiva API base URL |
243
243
  | `clientId` | `string` | **Required** | OAuth2 client ID (throws if missing) |
244
244
  | `redirectUri` | `string` | `window.location.origin + callbackPath` | OAuth2 redirect URI |
245
245
  | `scopes` | `string[]` | `['offline_access', 'Read.All', ...]` | OAuth2 scopes |
@@ -644,7 +644,7 @@ The simplest option is `initialTokens`:
644
644
 
645
645
  ```tsx
646
646
  <KivaAuthProvider
647
- apiUrl="https://alpha-api.docyrus.com"
647
+ apiUrl="https://api.kiva.app"
648
648
  clientId="your-oauth2-client-id"
649
649
  initialTokens={deviceFlowTokens}
650
650
  forceMode="standalone">
@@ -706,7 +706,7 @@ The accepted hosts are `localhost`, `127.0.0.1`, and `[::1]` over HTTP or HTTPS
706
706
  on any port, and `kiva.app`, `docyrus.com`, `attornaid.com`, and their subdomains over HTTPS.
707
707
  Supply a base URL without credentials, a query, or a fragment. Apps opened
708
708
  without `embedded=true` and embedded apps whose URL omits `apiUrl` use the
709
- provider's configured `apiUrl` or the default `https://alpha-api.docyrus.com`.
709
+ provider's configured `apiUrl` or the default `https://api.kiva.app`.
710
710
 
711
711
  An invalid host URL sets `status` to `'error'` and `error.message` to
712
712
  `'invalid-host-api-url'`. Authentication and API requests are blocked, and the
@@ -888,7 +888,7 @@ function OpenSettingsButton() {
888
888
  const { requestHostNavigation } = useKivaAuth();
889
889
 
890
890
  requestHostNavigation('/reports/q3', { replace: true });
891
- requestHostNavigation('https://docs.docyrus.com', { newTab: true });
891
+ requestHostNavigation('https://example.com', { newTab: true });
892
892
  ```
893
893
 
894
894
  **Vue** — call `requestHostNavigation` from the composable:
@@ -915,7 +915,7 @@ Enable `ssr` on the client-side provider to sync the access token to a cookie. T
915
915
 
916
916
  ```tsx
917
917
  <KivaAuthProvider
918
- apiUrl="https://alpha-api.docyrus.com"
918
+ apiUrl="https://api.kiva.app"
919
919
  clientId="your-oauth2-client-id"
920
920
  scopes={['offline_access', 'Read.All', 'Users.Read']}
921
921
  callbackPath="/auth/callback"
@@ -1,5 +1,5 @@
1
1
  import { OAuth2Tokens } from '@kivacore/api-client';
2
- import { a as KivaAuthConfig, y as GuidyElementsMessage, H as GuidyRoutesMessage, z as GuidyPointAckMessage, F as GuidyRoute, w as GuidyCommandMessage, p as AuthMode } from './types-DF2C4eb6.js';
2
+ import { a as KivaAuthConfig, y as GuidyElementsMessage, H as GuidyRoutesMessage, z as GuidyPointAckMessage, F as GuidyRoute, w as GuidyCommandMessage, p as AuthMode } from './types-YWGPWMCI.js';
3
3
 
4
4
  /**
5
5
  * Standalone OAuth2 authorization code flow with PKCE via page redirect.
@@ -1,5 +1,5 @@
1
1
  import { OAuth2Tokens, RestApiClient } from '@kivacore/api-client';
2
- import { a as KivaAuthConfig, p as AuthMode, q as AuthStatus, k as KivaUser, F as GuidyRoute, a1 as RouteChangePayload, M as HostNavigationRequestOptions, i as KivaSharePayload, d as KivaEmailPayload, c as KivaCalendarEventPayload, S as MsGraphClient, J as HostNavigationHandler, N as HostNotificationHandler, g as KivaRole, a0 as PermissionScope, $ as PermissionConfig } from './types-DF2C4eb6.js';
2
+ import { a as KivaAuthConfig, p as AuthMode, q as AuthStatus, k as KivaUser, F as GuidyRoute, a1 as RouteChangePayload, M as HostNavigationRequestOptions, i as KivaSharePayload, d as KivaEmailPayload, c as KivaCalendarEventPayload, S as MsGraphClient, J as HostNavigationHandler, N as HostNotificationHandler, g as KivaRole, a0 as PermissionScope, $ as PermissionConfig } from './types-YWGPWMCI.js';
3
3
 
4
4
  type AuthStateListener = (state: {
5
5
  status: AuthStatus;
@@ -261,7 +261,7 @@ declare function getAllowedOperations(user: KivaUser | null | undefined, scope?:
261
261
  */
262
262
  declare function hasPermission(user: KivaUser | null | undefined, operation: string, scope?: string | null | PermissionScope, config?: PermissionConfig): boolean;
263
263
 
264
- declare const DEFAULT_API_URL = "https://alpha-api.docyrus.com";
264
+ declare const DEFAULT_API_URL = "https://api.kiva.app";
265
265
  declare const DEFAULT_OAUTH_SCOPES: string[];
266
266
  declare const DEFAULT_CALLBACK_PATH = "/auth/callback";
267
267
  /** Default cookie name for SSR token sync */
@@ -1,7 +1,7 @@
1
- export { A as AuthManager, a as AuthStateListener, D as DEFAULT_API_URL, b as DEFAULT_CALLBACK_PATH, c as DEFAULT_OAUTH_SCOPES, g as getAllRoles, d as getAllowedOperations, h as hasPermission, e as hasRole } from './constants-DbICcNnA.js';
2
- export { G as GuidyBridge, S as StandaloneOAuth2Auth, d as detectAuthMode } from './auth-detector-CRKg56LT.js';
3
- import { K as KivaAclRule, a as KivaAuthConfig, b as KivaAuthContextValue, c as KivaCalendarEventPayload, d as KivaEmailPayload, e as KivaNotification, f as KivaPermission, g as KivaRole, h as KivaShareAdaptiveCardPayload, i as KivaSharePayload, j as KivaShareTextPayload, k as KivaUser } from './types-DF2C4eb6.js';
4
- export { A as AclOperation, l as AclTargetType, m as AdaptiveCard, n as AppNavigationRequestMessage, o as AppRouteChangeMessage, p as AuthMode, q as AuthStatus, C as CalendarSendAckMessage, r as CalendarSendMessage, s as ChatSendAckMessage, t as ChatSendMessage, D as DocySendAckMessage, u as DocySendMessage, E as EmailSendAckMessage, v as EmailSendMessage, G as GuidyCommandHandler, w as GuidyCommandMessage, x as GuidyElement, y as GuidyElementsMessage, z as GuidyPointAckMessage, B as GuidyPointMessage, F as GuidyRoute, H as GuidyRoutesMessage, I as GuidyScanMessage, J as HostNavigationHandler, L as HostNavigationMessage, M as HostNavigationRequestOptions, N as HostNotificationHandler, O as HostNotificationMessage, P as HostSignInMessage, Q as IframeAuth, R as MsGraphAccount, S as MsGraphClient, T as MsGraphRequest, U as MsGraphRequestMessage, V as MsGraphRequestOptions, W as MsGraphResponse, X as MsGraphResponseMessage, Y as MsGraphStatus, Z as MsGraphStatusRequestMessage, _ as MsGraphStatusResponseMessage, $ as PermissionConfig, a0 as PermissionScope, a1 as RouteChangePayload, a2 as TokenRefreshRequestMessage } from './types-DF2C4eb6.js';
1
+ export { A as AuthManager, a as AuthStateListener, D as DEFAULT_API_URL, b as DEFAULT_CALLBACK_PATH, c as DEFAULT_OAUTH_SCOPES, g as getAllRoles, d as getAllowedOperations, h as hasPermission, e as hasRole } from './constants-BKT0xwxH.js';
2
+ export { G as GuidyBridge, S as StandaloneOAuth2Auth, d as detectAuthMode } from './auth-detector-C_j4lGr4.js';
3
+ import { K as KivaAclRule, a as KivaAuthConfig, b as KivaAuthContextValue, c as KivaCalendarEventPayload, d as KivaEmailPayload, e as KivaNotification, f as KivaPermission, g as KivaRole, h as KivaShareAdaptiveCardPayload, i as KivaSharePayload, j as KivaShareTextPayload, k as KivaUser } from './types-YWGPWMCI.js';
4
+ export { A as AclOperation, l as AclTargetType, m as AdaptiveCard, n as AppNavigationRequestMessage, o as AppRouteChangeMessage, p as AuthMode, q as AuthStatus, C as CalendarSendAckMessage, r as CalendarSendMessage, s as ChatSendAckMessage, t as ChatSendMessage, D as DocySendAckMessage, u as DocySendMessage, E as EmailSendAckMessage, v as EmailSendMessage, G as GuidyCommandHandler, w as GuidyCommandMessage, x as GuidyElement, y as GuidyElementsMessage, z as GuidyPointAckMessage, B as GuidyPointMessage, F as GuidyRoute, H as GuidyRoutesMessage, I as GuidyScanMessage, J as HostNavigationHandler, L as HostNavigationMessage, M as HostNavigationRequestOptions, N as HostNotificationHandler, O as HostNotificationMessage, P as HostSignInMessage, Q as IframeAuth, R as MsGraphAccount, S as MsGraphClient, T as MsGraphRequest, U as MsGraphRequestMessage, V as MsGraphRequestOptions, W as MsGraphResponse, X as MsGraphResponseMessage, Y as MsGraphStatus, Z as MsGraphStatusRequestMessage, _ as MsGraphStatusResponseMessage, $ as PermissionConfig, a0 as PermissionScope, a1 as RouteChangePayload, a2 as TokenRefreshRequestMessage } from './types-YWGPWMCI.js';
5
5
  import '@kivacore/api-client';
6
6
 
7
7
  /** @deprecated Use `KivaAuthConfig` instead. */
@@ -3,7 +3,7 @@ import { BrowserOAuth2TokenStorage, OAuth2Client, RestApiClient, MemoryOAuth2Tok
3
3
  // src/core/auth-manager.ts
4
4
 
5
5
  // src/constants.ts
6
- var DEFAULT_API_URL = "https://alpha-api.docyrus.com";
6
+ var DEFAULT_API_URL = "https://api.kiva.app";
7
7
  var INVALID_HOST_API_URL = "invalid-host-api-url";
8
8
  var UNTRUSTED_BACKEND_MESSAGE = "This app can\u2019t run because its host gave it an untrusted backend address.";
9
9
  var DEFAULT_OAUTH_SCOPES = [