@seamless-auth/react 0.17.0 → 0.17.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @seamless-auth/react
2
2
 
3
+ ## 0.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 782583c: In bearer transport, a request that carries a token no longer follows a redirect to an origin outside `apiHost` and `trustedOrigins`. The client asks `fetch` for `redirect: 'manual'`, follows a redirect to a trusted origin itself (up to five hops, turning a `303`, or a `301` or `302` after a POST, into a GET as `fetch` does), and rejects any other with the new `UntrustedRedirectError` without sending the token on. Where the platform follows redirects regardless, as React Native's `fetch` does, a response that ended on another origin is rejected instead. A caller that sets `redirect` itself keeps that choice, and the final-origin check still applies. Requests without a token, and cookie transport, are unchanged.
8
+ - Updated dependencies [782583c]
9
+ - Updated dependencies [e3cf1f9]
10
+ - @seamless-auth/client@0.7.0
11
+
3
12
  ## 0.17.0
4
13
 
5
14
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AuthContextType, AuthPorts, AuthProvider, useAuth } from './AuthProvider';
2
2
  import { createSeamlessAuthClient, CredentialUpdateResult, CreateOrganizationInput, CurrentUserResult, FinishOAuthLoginInput, FinishOAuthLoginResult, LoginInput, LoginMethod, LoginStartResult, MessageResult, OAuthProvider, OAuthProvidersResult, PublicSystemConfigResult, OrganizationMemberInput, OrganizationMemberUpdateInput, OrganizationMembersResult, OrganizationMembershipResult, OrganizationResult, OrganizationSwitchResult, OrganizationsResult, PasskeyLoginData, PasskeyAttachment, PasskeyMetadata, PasskeyRegistrationData, RegisterInput, RegisterPasskeyOptions, SeamlessAuthClient, SeamlessAuthClientOptions, StartOAuthLoginInput, StartOAuthLoginResult, StepUpMethod, StepUpStatus, StepUpPrfData, TotpEnrollmentStartResult, TotpStatus, UpdateOrganizationInput } from '@seamless-auth/client';
3
- import { getOAuthErrorCode, getPasskeyPolicyErrorCode, getWebAuthnErrorDetail, isUnauthenticated, OAuthErrorCode, PasskeyPolicyErrorCode, SeamlessAuthError, UntrustedOriginError, WebAuthnErrorDetail } from '@seamless-auth/client';
3
+ import { getOAuthErrorCode, getPasskeyPolicyErrorCode, getWebAuthnErrorDetail, isUnauthenticated, OAuthErrorCode, PasskeyPolicyErrorCode, SeamlessAuthError, UntrustedOriginError, UntrustedRedirectError, WebAuthnErrorDetail } from '@seamless-auth/client';
4
4
  import type { SeamlessAuthResult } from '@seamless-auth/client';
5
5
  import { encodePrfSalt, extractPasskeyPrfResult, isPasskeyPrfSupported, PasskeyPrfInput, PasskeyPrfResult } from '@seamless-auth/client';
6
6
  import { useAuthClient } from './hooks/useAuthClient';
@@ -10,5 +10,5 @@ import { usePasskeySupport } from './hooks/usePasskeySupport';
10
10
  import { hasScopedRole, roleGrantsAccess } from '@seamless-auth/client';
11
11
  import { Credential, Organization, OrganizationMembership, User } from '@seamless-auth/client';
12
12
  import type { InitialSession, OAuthRedirectOutcome, OAuthRedirectPort, PasskeyPort, StoredTokens, TokenStoragePort, RefreshSessionOptions, TransportOptions } from '@seamless-auth/client';
13
- export { AuthProvider, createSeamlessAuthClient, encodePrfSalt, extractPasskeyPrfResult, getOAuthErrorCode, getPasskeyPolicyErrorCode, getWebAuthnErrorDetail, hasNonPasskeyLoginMethod, hasScopedRole, isPasskeyPrfSupported, isUnauthenticated, roleGrantsAccess, SeamlessAuthError, UntrustedOriginError, useAuth, useAuthClient, useAuthorizedFetch, useLoginMethods, usePasskeySupport, };
13
+ export { AuthProvider, createSeamlessAuthClient, encodePrfSalt, extractPasskeyPrfResult, getOAuthErrorCode, getPasskeyPolicyErrorCode, getWebAuthnErrorDetail, hasNonPasskeyLoginMethod, hasScopedRole, isPasskeyPrfSupported, isUnauthenticated, roleGrantsAccess, SeamlessAuthError, UntrustedOriginError, UntrustedRedirectError, useAuth, useAuthClient, useAuthorizedFetch, useLoginMethods, usePasskeySupport, };
14
14
  export type { CredentialUpdateResult, AuthContextType, AuthPorts, Credential, CreateOrganizationInput, CurrentUserResult, FinishOAuthLoginInput, FinishOAuthLoginResult, InitialSession, LoginInput, LoginMethod, LoginStartResult, MessageResult, OAuthErrorCode, OAuthProvider, OAuthProvidersResult, OAuthRedirectOutcome, OAuthRedirectPort, Organization, OrganizationMemberInput, OrganizationMembership, OrganizationMemberUpdateInput, OrganizationMembersResult, OrganizationMembershipResult, OrganizationResult, OrganizationSwitchResult, OrganizationsResult, PasskeyLoginData, PasskeyAttachment, PasskeyMetadata, PasskeyPolicyErrorCode, PasskeyPort, PasskeyPrfInput, PasskeyPrfResult, PasskeyRegistrationData, PublicSystemConfigResult, RefreshSessionOptions, RegisterInput, RegisterPasskeyOptions, SeamlessAuthClient, SeamlessAuthClientOptions, SeamlessAuthResult, StartOAuthLoginInput, StartOAuthLoginResult, StepUpMethod, StepUpStatus, StepUpPrfData, StoredTokens, TokenStoragePort, TotpEnrollmentStartResult, TotpStatus, TransportOptions, UpdateOrganizationInput, User, WebAuthnErrorDetail, };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  'use client';
2
- import{u as e}from"./chunks/shared-DbQnDPUA.js";export{A as AuthProvider,a as useAuthClient,b as useLoginMethods,c as usePasskeySupport}from"./chunks/shared-DbQnDPUA.js";export{SeamlessAuthError,UntrustedOriginError,createSeamlessAuthClient,encodePrfSalt,extractPasskeyPrfResult,getOAuthErrorCode,getPasskeyPolicyErrorCode,getWebAuthnErrorDetail,hasNonPasskeyLoginMethod,hasScopedRole,isPasskeyPrfSupported,isUnauthenticated,roleGrantsAccess}from"@seamless-auth/client";import"react";import"react/jsx-runtime";const r=()=>e().client.authorizedFetch;export{e as useAuth,r as useAuthorizedFetch};
2
+ import{u as e}from"./chunks/shared-DbQnDPUA.js";export{A as AuthProvider,a as useAuthClient,b as useLoginMethods,c as usePasskeySupport}from"./chunks/shared-DbQnDPUA.js";export{SeamlessAuthError,UntrustedOriginError,UntrustedRedirectError,createSeamlessAuthClient,encodePrfSalt,extractPasskeyPrfResult,getOAuthErrorCode,getPasskeyPolicyErrorCode,getWebAuthnErrorDetail,hasNonPasskeyLoginMethod,hasScopedRole,isPasskeyPrfSupported,isUnauthenticated,roleGrantsAccess}from"@seamless-auth/client";import"react";import"react/jsx-runtime";const r=()=>e().client.authorizedFetch;export{e as useAuth,r as useAuthorizedFetch};
3
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/hooks/useAuthorizedFetch.ts"],"sourcesContent":[null],"names":["useAuthorizedFetch","useAuth","client","authorizedFetch"],"mappings":";8fAaO,MAAMA,EAAqB,IAAMC,IAAUC,OAAOC"}
1
+ {"version":3,"file":"index.js","sources":["../src/hooks/useAuthorizedFetch.ts"],"sourcesContent":[null],"names":["useAuthorizedFetch","useAuth","client","authorizedFetch"],"mappings":";qhBAaO,MAAMA,EAAqB,IAAMC,IAAUC,OAAOC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamless-auth/react",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "A drop-in authentication solution for modern React applications.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -56,7 +56,7 @@
56
56
  }
57
57
  },
58
58
  "dependencies": {
59
- "@seamless-auth/client": "^0.6.0",
59
+ "@seamless-auth/client": "^0.7.0",
60
60
  "@seamless-auth/types": "^0.28.0",
61
61
  "@simplewebauthn/browser": "^13.1.0",
62
62
  "libphonenumber-js": "^1.12.7"