@connectid-tools/idp-selector-react 6.10.0-alpha.13 → 6.10.0-alpha.14

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.
Files changed (3) hide show
  1. package/CidButton.js +10 -11
  2. package/README.md +4 -1
  3. package/package.json +1 -1
package/CidButton.js CHANGED
@@ -44,6 +44,7 @@ forceBrowser = undefined, // only for testing purposes
44
44
  }));
45
45
  const [showPopup, setShowPopup] = useState(false);
46
46
  const [isIncognito, setIsIncognito] = useState();
47
+ const [authorisationServersThatDisplayedCompatibilityPopup, setAuthorisationServersThatDisplayedCompatibilityPopup] = useState([]);
47
48
  const analyticsData = {
48
49
  claims,
49
50
  rpLogoUrl,
@@ -125,11 +126,11 @@ forceBrowser = undefined, // only for testing purposes
125
126
  return;
126
127
  track();
127
128
  }, []);
128
- const getCompatibilityConfirmText = (compatibilityWarnings) => {
129
+ const getCompatibilityPopupText = (compatibilityWarnings) => {
129
130
  if (compatibilityWarnings.mobileOs === 'android' && compatibilityWarnings.browser === 'samsung') {
130
- return 'It looks like you are using Samsung Browser. This generally will not work - we suggest using Chrome and trying again.\nClick on "Cancel" to abort or "OK" to proceed.';
131
+ return "We couldn't open your identity provider's app. Samsung Internet doesn't support this step. To continue verifying your identity, please switch to a different browser.";
131
132
  }
132
- return 'It looks like you are in incognito mode. This generally will not work - we suggest switching out of incognito mode and trying again.\nClick on "Cancel" to abort or "OK" to proceed.';
133
+ return "Looks like you're in incognito mode.\nWe can't complete verification using this identity provider while private browsing is on. To continue, please open a regular browser window and try again.";
133
134
  };
134
135
  const handleOnProceed = (authorisationServerId, authorisationServerName, authorisationServerCertifications) => {
135
136
  if (typeof analytics !== 'undefined') {
@@ -147,14 +148,12 @@ forceBrowser = undefined, // only for testing purposes
147
148
  isIos: forceIos || isIos(),
148
149
  browser: forceBrowser || getBrowserName(),
149
150
  });
150
- if (showCompatibilityWarnings && compatibility.mightFail) {
151
- const confirmText = getCompatibilityConfirmText(compatibility);
152
- if (confirm(confirmText)) {
153
- onProceed(authorisationServerId, compatibility);
154
- }
155
- else {
156
- setShowPopup(true);
157
- }
151
+ const authorisationServerHasNotDisplayedCompatibilityPopup = authorisationServersThatDisplayedCompatibilityPopup.find(authServerId => authServerId === authorisationServerId) === undefined;
152
+ if (showCompatibilityWarnings && compatibility.mightFail && authorisationServerHasNotDisplayedCompatibilityPopup) {
153
+ const popupText = getCompatibilityPopupText(compatibility);
154
+ alert(popupText);
155
+ setShowPopup(true);
156
+ setAuthorisationServersThatDisplayedCompatibilityPopup([...authorisationServersThatDisplayedCompatibilityPopup, authorisationServerId]);
158
157
  return;
159
158
  }
160
159
  onProceed(authorisationServerId, compatibility);
package/README.md CHANGED
@@ -229,7 +229,7 @@ This is an optional field in addition with the widgets below the ConnectID butto
229
229
 
230
230
  ### <a name="showCompatibilityWarnings"></a>showCompatibilityWarnings option
231
231
 
232
- If set to `true`, a popup with compatibility warnings will be displayed after an IDP is selected, if the conditions are met. The popup will show information about the compatibility of the user's browser, device, incognito/private mode with the ConnectID flow and the user can decide whether they want to proceed or not.
232
+ If set to `true`, a popup with compatibility warnings will be displayed after an IDP is selected, if the conditions are met. The popup will show information about the compatibility of the user's browser, device, incognito/private mode with the ConnectID flow.
233
233
 
234
234
  <details>
235
235
  <summary>Show compatibility warnings</summary>
@@ -259,6 +259,9 @@ The SVG image below the ConnectID button has either option dark or light mode. B
259
259
 
260
260
  ## 🚀 Release Notes
261
261
 
262
+ ### 6.10.0-alpha.14 (Jul 18, 2025)
263
+ - Compatibility warning popup adjustments.
264
+
262
265
  ### 6.10.0-alpha.13 (Jul 18, 2025)
263
266
  - Remove `Available on` from IDP logo list image.
264
267
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectid-tools/idp-selector-react",
3
- "version": "6.10.0-alpha.13",
3
+ "version": "6.10.0-alpha.14",
4
4
  "description": "React component for IDP Selector.",
5
5
  "main": "index.js",
6
6
  "type": "module",