@dynamic-labs/utils 4.0.0-alpha.2 → 4.0.0-alpha.4
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 +21 -0
- package/package.json +5 -6
- package/src/eip6963/eip6963Provider.d.ts +1 -3
- package/src/services/Oauth2Service/Oauth2Service.cjs +5 -6
- package/src/services/Oauth2Service/Oauth2Service.d.ts +1 -1
- package/src/services/Oauth2Service/Oauth2Service.js +5 -6
- package/src/services/Oauth2Service/createWindowOauth2Service/createWindowOauth2Service.cjs +4 -1
- package/src/services/Oauth2Service/createWindowOauth2Service/createWindowOauth2Service.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.0.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.3...v4.0.0-alpha.4) (2024-09-23)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* issue where builtin stream module was a dependency ([#6968](https://github.com/dynamic-labs/DynamicAuth/issues/6968)) ([0661129](https://github.com/dynamic-labs/DynamicAuth/commit/0661129920ba70ebbcd4d17ee5aa988c51d1b477))
|
|
8
|
+
* update in memory secure storage ([#6955](https://github.com/dynamic-labs/DynamicAuth/issues/6955)) ([697fc20](https://github.com/dynamic-labs/DynamicAuth/commit/697fc20740b243fa31ecf06e8b2ed9d09932a544))
|
|
9
|
+
|
|
10
|
+
## [4.0.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.2...v4.0.0-alpha.3) (2024-09-20)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* developers provide global connectivity appkit project id ([#6941](https://github.com/dynamic-labs/DynamicAuth/issues/6941)) ([83760ea](https://github.com/dynamic-labs/DynamicAuth/commit/83760ea57591685b12caee945f173f6a7f9312d1))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* don't try to set up event listeners if wallet provider doesn't support it ([#6943](https://github.com/dynamic-labs/DynamicAuth/issues/6943)) ([439f1bb](https://github.com/dynamic-labs/DynamicAuth/commit/439f1bbb3c765959756cfc6eeb8429e4018e0379))
|
|
21
|
+
* dont verify all signatures for solana embedded multisig tx ([#6953](https://github.com/dynamic-labs/DynamicAuth/issues/6953)) ([7a7973e](https://github.com/dynamic-labs/DynamicAuth/commit/7a7973e05f0960421b348a55c6a00c9fd873b0b7))
|
|
22
|
+
|
|
2
23
|
## [4.0.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v4.0.0-alpha.1...v4.0.0-alpha.2) (2024-09-18)
|
|
3
24
|
|
|
4
25
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/utils",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
|
|
@@ -26,13 +26,12 @@
|
|
|
26
26
|
"./package.json": "./package.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
29
|
+
"@dynamic-labs/sdk-api-core": "0.0.535",
|
|
30
30
|
"tldts": "6.0.16",
|
|
31
|
-
"@dynamic-labs/logger": "4.0.0-alpha.
|
|
32
|
-
"@dynamic-labs/types": "4.0.0-alpha.
|
|
31
|
+
"@dynamic-labs/logger": "4.0.0-alpha.4",
|
|
32
|
+
"@dynamic-labs/types": "4.0.0-alpha.4",
|
|
33
33
|
"buffer": "6.0.3",
|
|
34
|
-
"eventemitter3": "5.0.1"
|
|
35
|
-
"stream": "0.0.2"
|
|
34
|
+
"eventemitter3": "5.0.1"
|
|
36
35
|
},
|
|
37
36
|
"peerDependencies": {}
|
|
38
37
|
}
|
|
@@ -28,11 +28,10 @@ class Oauth2Service {
|
|
|
28
28
|
_a = Oauth2Service;
|
|
29
29
|
_Oauth2Service_implementation = { value: void 0 };
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
-
Oauth2Service.isGetOauthCodeError = (error) => error === '
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
typeof error.message === 'string');
|
|
31
|
+
Oauth2Service.isGetOauthCodeError = (error) => typeof error === 'object' &&
|
|
32
|
+
'code' in error &&
|
|
33
|
+
Object.values(types.SocialOAuthErrorCode).includes(error.code) &&
|
|
34
|
+
'message' in error &&
|
|
35
|
+
typeof error.message === 'string';
|
|
37
36
|
|
|
38
37
|
exports.Oauth2Service = Oauth2Service;
|
|
@@ -25,7 +25,7 @@ export type GetOauthCodeProps = {
|
|
|
25
25
|
export type IOauth2Service = {
|
|
26
26
|
getOauthCode: (props: GetOauthCodeProps) => Promise<string>;
|
|
27
27
|
};
|
|
28
|
-
export type GetOauthCodeError =
|
|
28
|
+
export type GetOauthCodeError = {
|
|
29
29
|
code: SocialOAuthErrorCode;
|
|
30
30
|
message: string;
|
|
31
31
|
};
|
|
@@ -24,11 +24,10 @@ class Oauth2Service {
|
|
|
24
24
|
_a = Oauth2Service;
|
|
25
25
|
_Oauth2Service_implementation = { value: void 0 };
|
|
26
26
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
-
Oauth2Service.isGetOauthCodeError = (error) => error === '
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
typeof error.message === 'string');
|
|
27
|
+
Oauth2Service.isGetOauthCodeError = (error) => typeof error === 'object' &&
|
|
28
|
+
'code' in error &&
|
|
29
|
+
Object.values(SocialOAuthErrorCode).includes(error.code) &&
|
|
30
|
+
'message' in error &&
|
|
31
|
+
typeof error.message === 'string';
|
|
33
32
|
|
|
34
33
|
export { Oauth2Service };
|
|
@@ -167,7 +167,10 @@ const createWindowOauth2Service = () => ({
|
|
|
167
167
|
setIsProcessing(false);
|
|
168
168
|
// user didn't complete oauth
|
|
169
169
|
if (providersWaitingOauthMessage[provider])
|
|
170
|
-
typedReject(
|
|
170
|
+
typedReject({
|
|
171
|
+
code: types.SocialOAuthErrorCode.USER_CANCELLED,
|
|
172
|
+
message: 'User cancelled connection',
|
|
173
|
+
});
|
|
171
174
|
}, 2000);
|
|
172
175
|
});
|
|
173
176
|
}),
|
|
@@ -163,7 +163,10 @@ const createWindowOauth2Service = () => ({
|
|
|
163
163
|
setIsProcessing(false);
|
|
164
164
|
// user didn't complete oauth
|
|
165
165
|
if (providersWaitingOauthMessage[provider])
|
|
166
|
-
typedReject(
|
|
166
|
+
typedReject({
|
|
167
|
+
code: SocialOAuthErrorCode.USER_CANCELLED,
|
|
168
|
+
message: 'User cancelled connection',
|
|
169
|
+
});
|
|
167
170
|
}, 2000);
|
|
168
171
|
});
|
|
169
172
|
}),
|