@lumiapassport/ui-kit 1.16.1 → 1.16.3
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/dist/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/iframe/oauth/x.js +72 -14
- package/dist/index.cjs +23 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3383,6 +3383,24 @@ var init_iframe_manager = __esm({
|
|
|
3383
3383
|
});
|
|
3384
3384
|
} else if (event.data.type === "X_AUTH_SUCCESS" && eventProvider === "x" && providerKey === "x") {
|
|
3385
3385
|
this.log("[IframeManager] X auth successful from popup:", event.data);
|
|
3386
|
+
if (event.data.tokens) {
|
|
3387
|
+
this.log("[IframeManager] Tokens received in postMessage, storing via jwtTokenManager");
|
|
3388
|
+
Promise.resolve().then(() => (init_auth(), auth_exports)).then(({ jwtTokenManager: jwtTokenManager4 }) => {
|
|
3389
|
+
return jwtTokenManager4.setTokens({
|
|
3390
|
+
accessToken: event.data.tokens.accessToken,
|
|
3391
|
+
refreshToken: event.data.tokens.refreshToken,
|
|
3392
|
+
userId: event.data.user.userId,
|
|
3393
|
+
expiresIn: event.data.user.expiresIn || 3600,
|
|
3394
|
+
hasKeyshare: event.data.user.hasKeyshare || false,
|
|
3395
|
+
displayName: event.data.user.displayName || null,
|
|
3396
|
+
providers: event.data.user.providers || ["x"]
|
|
3397
|
+
});
|
|
3398
|
+
}).then(() => {
|
|
3399
|
+
this.log("[IframeManager] Tokens stored successfully");
|
|
3400
|
+
}).catch((tokenError) => {
|
|
3401
|
+
this.log("[IframeManager] Warning: Failed to store tokens:", tokenError);
|
|
3402
|
+
});
|
|
3403
|
+
}
|
|
3386
3404
|
finalize({
|
|
3387
3405
|
success: true,
|
|
3388
3406
|
user: event.data.user,
|
|
@@ -5620,7 +5638,7 @@ function Header() {
|
|
|
5620
5638
|
// package.json
|
|
5621
5639
|
var package_default = {
|
|
5622
5640
|
name: "@lumiapassport/ui-kit",
|
|
5623
|
-
version: "1.16.
|
|
5641
|
+
version: "1.16.3",
|
|
5624
5642
|
description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
|
|
5625
5643
|
type: "module",
|
|
5626
5644
|
main: "./dist/index.cjs",
|
|
@@ -6987,23 +7005,16 @@ function Social(props) {
|
|
|
6987
7005
|
const { user } = result;
|
|
6988
7006
|
if (normalizedProviderId === "x" || normalizedProviderId === "twitter") {
|
|
6989
7007
|
console.log("[AuthModal] X OAuth completed, user authenticated via callback");
|
|
6990
|
-
|
|
6991
|
-
const verifyUrl = addProjectIdToUrl(`${tssUrl2}/api/auth/verify`);
|
|
6992
|
-
const verifyResponse = await fetch(verifyUrl, {
|
|
6993
|
-
method: "GET",
|
|
6994
|
-
credentials: "include"
|
|
6995
|
-
});
|
|
6996
|
-
if (!verifyResponse.ok) {
|
|
7008
|
+
if (!user) {
|
|
6997
7009
|
setAlert({
|
|
6998
7010
|
title: "Authentication Failed",
|
|
6999
|
-
message: "
|
|
7011
|
+
message: "No user data received from X authentication"
|
|
7000
7012
|
});
|
|
7001
7013
|
setIsLoading(false);
|
|
7002
7014
|
return;
|
|
7003
7015
|
}
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
await finalizeSocialLogin(loginResponse2, "x");
|
|
7016
|
+
console.log("[AuthModal] X login data:", user);
|
|
7017
|
+
await finalizeSocialLogin(user, "x");
|
|
7007
7018
|
return;
|
|
7008
7019
|
}
|
|
7009
7020
|
if (!user) {
|