@rakomi/react-native 0.3.0 → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
2
2
 
3
- For the npm package: @rakomi/react-native@0.3.0
3
+ For the npm package: @rakomi/react-native@0.3.1
4
4
 
5
5
  This package's published bundle (`dist/`) INLINES the third-party components listed below.
6
6
  Their copyright and permission notices are reproduced verbatim, as required by their licenses
package/dist/index.cjs CHANGED
@@ -1636,8 +1636,8 @@ function SignIn(props) {
1636
1636
  const [step, setStep] = react.useState({ kind: "methods" });
1637
1637
  const [code, setCode] = react.useState("");
1638
1638
  const [busy, setBusy] = react.useState(false);
1639
- const tokenEndpoint = props.tokenEndpoint ?? "/v1/auth/oauth/callback";
1640
- const totpVerifyEndpoint = props.totpVerifyEndpoint ?? "/v1/auth/mfa/totp/verify";
1639
+ const tokenEndpoint = props.tokenEndpoint ?? "/oauth/token";
1640
+ const totpVerifyEndpoint = props.totpVerifyEndpoint ?? "/v1/auth/mfa/verify-login";
1641
1641
  const providers = props.providers ?? ["google"];
1642
1642
  async function onProviderPress(provider) {
1643
1643
  if (busy) return;
@@ -2686,7 +2686,7 @@ function useMfa() {
2686
2686
  const ctx = useRakomiContext();
2687
2687
  return {
2688
2688
  verifyTotp: async (challengeToken, code, endpoint) => {
2689
- const url = endpoint ?? `${ctx.baseUrl}/v1/auth/mfa/totp/verify`;
2689
+ const url = endpoint ?? `${ctx.baseUrl}/v1/auth/mfa/verify-login`;
2690
2690
  const result = await sdkCore.verifyTotp({ http: ctx.http, endpoint: url, challengeToken, code });
2691
2691
  if (result.ok) {
2692
2692
  const nonce = await ctx.beginAuthFlow();
package/dist/index.d.cts CHANGED
@@ -394,9 +394,9 @@ interface SignInProps {
394
394
  * path on the API host returns JSON, not the hosted login UI.
395
395
  */
396
396
  authorizationEndpoint?: string;
397
- /** Token endpoint, default `${baseUrl}/v1/auth/oauth/callback`. */
397
+ /** RFC 6749 §3.2 token endpoint used for the PKCE code→token exchange, default `${baseUrl}/oauth/token`. */
398
398
  tokenEndpoint?: string;
399
- /** MFA TOTP verify endpoint, default `${baseUrl}/v1/auth/mfa/totp/verify`. */
399
+ /** MFA TOTP verify endpoint, default `${baseUrl}/v1/auth/mfa/verify-login`. */
400
400
  totpVerifyEndpoint?: string;
401
401
  /** Social providers to render. Default: ['google']. */
402
402
  providers?: string[];
package/dist/index.d.ts CHANGED
@@ -394,9 +394,9 @@ interface SignInProps {
394
394
  * path on the API host returns JSON, not the hosted login UI.
395
395
  */
396
396
  authorizationEndpoint?: string;
397
- /** Token endpoint, default `${baseUrl}/v1/auth/oauth/callback`. */
397
+ /** RFC 6749 §3.2 token endpoint used for the PKCE code→token exchange, default `${baseUrl}/oauth/token`. */
398
398
  tokenEndpoint?: string;
399
- /** MFA TOTP verify endpoint, default `${baseUrl}/v1/auth/mfa/totp/verify`. */
399
+ /** MFA TOTP verify endpoint, default `${baseUrl}/v1/auth/mfa/verify-login`. */
400
400
  totpVerifyEndpoint?: string;
401
401
  /** Social providers to render. Default: ['google']. */
402
402
  providers?: string[];
package/dist/index.js CHANGED
@@ -1635,8 +1635,8 @@ function SignIn(props) {
1635
1635
  const [step, setStep] = useState({ kind: "methods" });
1636
1636
  const [code, setCode] = useState("");
1637
1637
  const [busy, setBusy] = useState(false);
1638
- const tokenEndpoint = props.tokenEndpoint ?? "/v1/auth/oauth/callback";
1639
- const totpVerifyEndpoint = props.totpVerifyEndpoint ?? "/v1/auth/mfa/totp/verify";
1638
+ const tokenEndpoint = props.tokenEndpoint ?? "/oauth/token";
1639
+ const totpVerifyEndpoint = props.totpVerifyEndpoint ?? "/v1/auth/mfa/verify-login";
1640
1640
  const providers = props.providers ?? ["google"];
1641
1641
  async function onProviderPress(provider) {
1642
1642
  if (busy) return;
@@ -2685,7 +2685,7 @@ function useMfa() {
2685
2685
  const ctx = useRakomiContext();
2686
2686
  return {
2687
2687
  verifyTotp: async (challengeToken, code, endpoint) => {
2688
- const url = endpoint ?? `${ctx.baseUrl}/v1/auth/mfa/totp/verify`;
2688
+ const url = endpoint ?? `${ctx.baseUrl}/v1/auth/mfa/verify-login`;
2689
2689
  const result = await verifyTotp({ http: ctx.http, endpoint: url, challengeToken, code });
2690
2690
  if (result.ok) {
2691
2691
  const nonce = await ctx.beginAuthFlow();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rakomi/react-native",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "React Native / Expo SDK for Rakomi authentication.",
5
5
  "keywords": [
6
6
  "rakomi",
@@ -83,11 +83,11 @@
83
83
  }
84
84
  },
85
85
  "devDependencies": {
86
- "@rakomi/react": "0.3.0"
86
+ "@rakomi/react": "0.3.1"
87
87
  },
88
88
  "dependencies": {
89
89
  "jose": "^6.2.3",
90
- "@rakomi/sdk-core": "^0.3.0"
90
+ "@rakomi/sdk-core": "^0.3.1"
91
91
  },
92
92
  "scripts": {
93
93
  "build": "NODE_OPTIONS=--max-old-space-size=4096 tsup",
package/sbom.cdx.json CHANGED
@@ -26,10 +26,10 @@
26
26
  },
27
27
  "component": {
28
28
  "type": "library",
29
- "bom-ref": "pkg:npm/%40rakomi%2Freact-native@0.3.0",
29
+ "bom-ref": "pkg:npm/%40rakomi%2Freact-native@0.3.1",
30
30
  "name": "@rakomi/react-native",
31
- "version": "0.3.0",
32
- "purl": "pkg:npm/%40rakomi%2Freact-native@0.3.0",
31
+ "version": "0.3.1",
32
+ "purl": "pkg:npm/%40rakomi%2Freact-native@0.3.1",
33
33
  "licenses": [
34
34
  {
35
35
  "license": {
@@ -42,10 +42,10 @@
42
42
  "components": [
43
43
  {
44
44
  "type": "library",
45
- "bom-ref": "pkg:npm/@rakomi/sdk-core@0.3.0",
45
+ "bom-ref": "pkg:npm/@rakomi/sdk-core@0.3.1",
46
46
  "name": "@rakomi/sdk-core",
47
- "version": "0.3.0",
48
- "purl": "pkg:npm/@rakomi/sdk-core@0.3.0",
47
+ "version": "0.3.1",
48
+ "purl": "pkg:npm/@rakomi/sdk-core@0.3.1",
49
49
  "licenses": [
50
50
  {
51
51
  "license": {