@dynamic-labs/utils 4.25.0 → 4.25.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,4 +1,18 @@
1
1
 
2
+ ### [4.25.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.25.0...v4.25.1) (2025-07-18)
3
+
4
+
5
+ ### Features
6
+
7
+ * add passkey sign in react hook ([#9188](https://github.com/dynamic-labs/dynamic-auth/issues/9188)) ([9d36886](https://github.com/dynamic-labs/dynamic-auth/commit/9d368860ca097777addf5e6f7e57c039cfbbb503))
8
+ * add support for social redirect with iframe-setup ([#9193](https://github.com/dynamic-labs/dynamic-auth/issues/9193)) ([fdfb321](https://github.com/dynamic-labs/dynamic-auth/commit/fdfb321220185d56d061342782754ad72e4b404e))
9
+ * update Argent wallet names to Ready branding ([#9142](https://github.com/dynamic-labs/dynamic-auth/issues/9142)) ([194e4cf](https://github.com/dynamic-labs/dynamic-auth/commit/194e4cf68ede58e2d38c6c720c01428b4e79cdf3))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * show hcaptcha for email and sms headless ([#9187](https://github.com/dynamic-labs/dynamic-auth/issues/9187)) ([9fa0860](https://github.com/dynamic-labs/dynamic-auth/commit/9fa086015196ff2c043d88e23f029964ddee92ab))
15
+
2
16
  ## [4.25.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.24.0...v4.25.0) (2025-07-17)
3
17
 
4
18
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.25.0";
6
+ var version = "4.25.1";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.25.0";
2
+ var version = "4.25.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/utils",
3
- "version": "4.25.0",
3
+ "version": "4.25.1",
4
4
  "description": "A React SDK for implementing wallet web3 authentication and authorization to your website.",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.0.718",
22
22
  "tldts": "6.0.16",
23
- "@dynamic-labs/assert-package-version": "4.25.0",
24
- "@dynamic-labs/logger": "4.25.0",
25
- "@dynamic-labs/types": "4.25.0",
23
+ "@dynamic-labs/assert-package-version": "4.25.1",
24
+ "@dynamic-labs/logger": "4.25.1",
25
+ "@dynamic-labs/types": "4.25.1",
26
26
  "buffer": "6.0.3",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
@@ -3,9 +3,10 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var setupPlatformService = require('./utils/setupPlatformService/setupPlatformService.cjs');
7
6
  var getInitialParentURL = require('./utils/getInitialParentURL/getInitialParentURL.cjs');
8
7
  var setupPlatformEventsService = require('./utils/setupPlatformEventsService/setupPlatformEventsService.cjs');
8
+ var setupPlatformService = require('./utils/setupPlatformService/setupPlatformService.cjs');
9
+ var setupSocialService = require('./utils/setupSocialService/setupSocialService.cjs');
9
10
 
10
11
  const setupInsideIframe = () => {
11
12
  if (typeof window === 'undefined')
@@ -15,6 +16,7 @@ const setupInsideIframe = () => {
15
16
  // Setup services
16
17
  setupPlatformService.setupPlatformService(initialParentURL);
17
18
  setupPlatformEventsService.setupPlatformEventsService(initialParentURL);
19
+ setupSocialService.setupSocialService();
18
20
  };
19
21
 
20
22
  exports.setupInsideIframe = setupInsideIframe;
@@ -1,7 +1,8 @@
1
1
  'use client'
2
- import { setupPlatformService } from './utils/setupPlatformService/setupPlatformService.js';
3
2
  import { getInitialParentURL } from './utils/getInitialParentURL/getInitialParentURL.js';
4
3
  import { setupPlatformEventsService } from './utils/setupPlatformEventsService/setupPlatformEventsService.js';
4
+ import { setupPlatformService } from './utils/setupPlatformService/setupPlatformService.js';
5
+ import { setupSocialService } from './utils/setupSocialService/setupSocialService.js';
5
6
 
6
7
  const setupInsideIframe = () => {
7
8
  if (typeof window === 'undefined')
@@ -11,6 +12,7 @@ const setupInsideIframe = () => {
11
12
  // Setup services
12
13
  setupPlatformService(initialParentURL);
13
14
  setupPlatformEventsService(initialParentURL);
15
+ setupSocialService();
14
16
  };
15
17
 
16
18
  export { setupInsideIframe };
@@ -0,0 +1 @@
1
+ export { setupSocialService } from './setupSocialService';
@@ -0,0 +1,37 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var _tslib = require('../../../../_virtual/_tslib.cjs');
7
+ var sdkApiCore = require('@dynamic-labs/sdk-api-core');
8
+ var Oauth2Service = require('../../../services/Oauth2Service/Oauth2Service.cjs');
9
+ require('@dynamic-labs/types');
10
+ require('../../../logger/logger.cjs');
11
+ var PlatformService = require('../../../services/PlatformService/PlatformService.cjs');
12
+ require('tldts');
13
+
14
+ const setupSocialService = () => {
15
+ Oauth2Service.Oauth2Service.implementation = {
16
+ getOauthCode: (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ setIsProcessing, strategy, provider, oauthLoginUrl, initWebAuth, redirectUrl, }) {
17
+ return new Promise((_, reject) => {
18
+ setIsProcessing(true);
19
+ /**
20
+ * Use redirect flow on mobile for all providers except Telegram
21
+ */
22
+ if (strategy === 'redirect' && provider !== sdkApiCore.ProviderEnum.Telegram) {
23
+ if (!redirectUrl) {
24
+ throw new Error('Redirect URL is required');
25
+ }
26
+ initWebAuth({
27
+ redirectUrl,
28
+ }).then(() => PlatformService.PlatformService.openURL(oauthLoginUrl.toString()));
29
+ return;
30
+ }
31
+ reject(new Error('Unsupported social provider'));
32
+ });
33
+ }),
34
+ };
35
+ };
36
+
37
+ exports.setupSocialService = setupSocialService;
@@ -0,0 +1 @@
1
+ export declare const setupSocialService: () => void;
@@ -0,0 +1,33 @@
1
+ 'use client'
2
+ import { __awaiter } from '../../../../_virtual/_tslib.js';
3
+ import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
4
+ import { Oauth2Service } from '../../../services/Oauth2Service/Oauth2Service.js';
5
+ import '@dynamic-labs/types';
6
+ import '../../../logger/logger.js';
7
+ import { PlatformService } from '../../../services/PlatformService/PlatformService.js';
8
+ import 'tldts';
9
+
10
+ const setupSocialService = () => {
11
+ Oauth2Service.implementation = {
12
+ getOauthCode: (_a) => __awaiter(void 0, [_a], void 0, function* ({ setIsProcessing, strategy, provider, oauthLoginUrl, initWebAuth, redirectUrl, }) {
13
+ return new Promise((_, reject) => {
14
+ setIsProcessing(true);
15
+ /**
16
+ * Use redirect flow on mobile for all providers except Telegram
17
+ */
18
+ if (strategy === 'redirect' && provider !== ProviderEnum.Telegram) {
19
+ if (!redirectUrl) {
20
+ throw new Error('Redirect URL is required');
21
+ }
22
+ initWebAuth({
23
+ redirectUrl,
24
+ }).then(() => PlatformService.openURL(oauthLoginUrl.toString()));
25
+ return;
26
+ }
27
+ reject(new Error('Unsupported social provider'));
28
+ });
29
+ }),
30
+ };
31
+ };
32
+
33
+ export { setupSocialService };