@yourself_id/siwys-react-js 0.33.2-sapp1291-browser-extension-partner-sdk.68.0 → 0.34.0

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
@@ -4,18 +4,21 @@ React components for Sign in with your SELF.
4
4
 
5
5
  ## Browser Extension Bridge
6
6
 
7
- `SignInWithYourSelf` and `ConnectYourSelf` automatically use the
8
- browser-extension flow in desktop Chromium browsers. Mobile and unsupported
9
- browsers retain the existing challenge deep-link behavior. Set
10
- `extensionConfig` to `false` to disable the extension flow, or provide an
11
- installation URL for browsers where the extension is not installed.
7
+ `SignInWithYourSelf` and `ConnectYourSelf` use the browser-extension flow on
8
+ desktop Chrome, Edge, Firefox, and Safari. If the extension is missing, the
9
+ SDK opens that browser's store listing in a new tab and keeps the current page
10
+ visible for QR fallback. On iPhone, iPad, and Android, the sign-in button opens
11
+ the challenge link so the installed SELF app can handle it. If the app does not
12
+ open, the active window goes to the App Store or Play Store. Mobile and tablet
13
+ flows are button-first and do not render the QR code block. Set `extensionConfig`
14
+ to `false` to skip the extension check on desktop.
12
15
 
13
16
  ```tsx
14
17
  <SignInWithYourSelf
15
18
  challengeDID={challengeDID}
16
19
  pollForAuthUrl="https://partner.example/auth/status"
17
20
  extensionConfig={{
18
- installUrl: "https://partner.example/install-self-extension",
21
+ detectionTimeoutMs: 1000,
19
22
  }}
20
23
  />
21
24
  ```
package/dist/index.d.mts CHANGED
@@ -32,7 +32,6 @@ interface ExtensionPartner {
32
32
  imageUrl?: string;
33
33
  }
34
34
  interface ExtensionBridgeConfig {
35
- installUrl?: string;
36
35
  detectionTimeoutMs?: number;
37
36
  }
38
37
 
@@ -48,9 +47,14 @@ interface SignInPropsBase {
48
47
  showInstructions?: boolean;
49
48
  extensionConfig?: ExtensionBridgeConfig | false;
50
49
  partner?: ExtensionPartner;
50
+ requestedCredentials?: RequestedCredential[];
51
51
  onAuthenticated?: (session: SignInSession) => void;
52
52
  onExtensionResult?: (result: ExtensionSignInResult) => void;
53
53
  }
54
+ interface RequestedCredential {
55
+ schema: string;
56
+ issuers?: string[];
57
+ }
54
58
  interface SignInSession {
55
59
  did?: string;
56
60
  }
@@ -77,9 +81,10 @@ interface ConnectYourSelfProps {
77
81
  onConnectPress?: () => void;
78
82
  extensionConfig?: ExtensionBridgeConfig | false;
79
83
  partner?: ExtensionPartner;
84
+ requestedCredentials?: RequestedCredential[];
80
85
  onAuthenticated?: (session: SignInSession) => void;
81
86
  onExtensionResult?: (result: ExtensionSignInResult) => void;
82
87
  }
83
88
  declare const ConnectYourSelf: React.FC<ConnectYourSelfProps>;
84
89
 
85
- export { ConnectYourSelf, CysButton, EXTENSION_ERROR_CODE, type ExtensionBridgeConfig, type ExtensionErrorCode, type ExtensionPartner, type ExtensionSignInResult, type ExtensionSignInStatus, QRCode, type SignInSession, SignInWithYourSelf, SiwysButton };
90
+ export { ConnectYourSelf, CysButton, EXTENSION_ERROR_CODE, type ExtensionBridgeConfig, type ExtensionErrorCode, type ExtensionPartner, type ExtensionSignInResult, type ExtensionSignInStatus, QRCode, type RequestedCredential, type SignInSession, SignInWithYourSelf, SiwysButton };
package/dist/index.d.ts CHANGED
@@ -32,7 +32,6 @@ interface ExtensionPartner {
32
32
  imageUrl?: string;
33
33
  }
34
34
  interface ExtensionBridgeConfig {
35
- installUrl?: string;
36
35
  detectionTimeoutMs?: number;
37
36
  }
38
37
 
@@ -48,9 +47,14 @@ interface SignInPropsBase {
48
47
  showInstructions?: boolean;
49
48
  extensionConfig?: ExtensionBridgeConfig | false;
50
49
  partner?: ExtensionPartner;
50
+ requestedCredentials?: RequestedCredential[];
51
51
  onAuthenticated?: (session: SignInSession) => void;
52
52
  onExtensionResult?: (result: ExtensionSignInResult) => void;
53
53
  }
54
+ interface RequestedCredential {
55
+ schema: string;
56
+ issuers?: string[];
57
+ }
54
58
  interface SignInSession {
55
59
  did?: string;
56
60
  }
@@ -77,9 +81,10 @@ interface ConnectYourSelfProps {
77
81
  onConnectPress?: () => void;
78
82
  extensionConfig?: ExtensionBridgeConfig | false;
79
83
  partner?: ExtensionPartner;
84
+ requestedCredentials?: RequestedCredential[];
80
85
  onAuthenticated?: (session: SignInSession) => void;
81
86
  onExtensionResult?: (result: ExtensionSignInResult) => void;
82
87
  }
83
88
  declare const ConnectYourSelf: React.FC<ConnectYourSelfProps>;
84
89
 
85
- export { ConnectYourSelf, CysButton, EXTENSION_ERROR_CODE, type ExtensionBridgeConfig, type ExtensionErrorCode, type ExtensionPartner, type ExtensionSignInResult, type ExtensionSignInStatus, QRCode, type SignInSession, SignInWithYourSelf, SiwysButton };
90
+ export { ConnectYourSelf, CysButton, EXTENSION_ERROR_CODE, type ExtensionBridgeConfig, type ExtensionErrorCode, type ExtensionPartner, type ExtensionSignInResult, type ExtensionSignInStatus, QRCode, type RequestedCredential, type SignInSession, SignInWithYourSelf, SiwysButton };