@imtbl/auth-next-client 2.12.5-alpha.22 → 2.12.6-alpha.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/dist/types/hooks.d.ts +2 -4
- package/dist/types/types.d.ts +2 -2
- package/package.json +3 -3
- package/src/hooks.tsx +3 -5
- package/src/types.ts +2 -2
package/dist/types/hooks.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Session } from 'next-auth';
|
|
2
2
|
import type { User, LoginConfig, StandaloneLoginOptions } from '@imtbl/auth';
|
|
3
|
+
import type { ZkEvmInfo } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* Extended session type with Immutable token data
|
|
5
6
|
*/
|
|
@@ -8,10 +9,7 @@ export interface ImmutableSession extends Session {
|
|
|
8
9
|
refreshToken?: string;
|
|
9
10
|
idToken?: string;
|
|
10
11
|
accessTokenExpires: number;
|
|
11
|
-
zkEvm?:
|
|
12
|
-
ethAddress: string;
|
|
13
|
-
userAdminAddress: string;
|
|
14
|
-
};
|
|
12
|
+
zkEvm?: ZkEvmInfo;
|
|
15
13
|
error?: string;
|
|
16
14
|
}
|
|
17
15
|
/**
|
package/dist/types/types.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export type { ImmutableAuthConfig, ImmutableTokenData, ZkEvmUser, ImmutableUser,
|
|
|
4
4
|
* zkEVM wallet information
|
|
5
5
|
*/
|
|
6
6
|
export interface ZkEvmInfo {
|
|
7
|
-
ethAddress: string
|
|
8
|
-
userAdminAddress: string
|
|
7
|
+
ethAddress: `0x${string}`;
|
|
8
|
+
userAdminAddress: `0x${string}`;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* Auth.js v5 module augmentation to add Immutable-specific fields
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtbl/auth-next-client",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.6-alpha.0",
|
|
4
4
|
"description": "Immutable Auth.js v5 integration for Next.js - Client-side components",
|
|
5
5
|
"author": "Immutable",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@imtbl/auth": "2.12.
|
|
31
|
-
"@imtbl/auth-next-server": "2.12.
|
|
30
|
+
"@imtbl/auth": "2.12.6-alpha.0",
|
|
31
|
+
"@imtbl/auth-next-server": "2.12.6-alpha.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"next": "^15.0.0",
|
package/src/hooks.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
LoginConfig,
|
|
9
9
|
StandaloneLoginOptions,
|
|
10
10
|
} from '@imtbl/auth';
|
|
11
|
+
import type { ZkEvmInfo } from './types';
|
|
11
12
|
import {
|
|
12
13
|
loginWithPopup as rawLoginWithPopup,
|
|
13
14
|
loginWithEmbedded as rawLoginWithEmbedded,
|
|
@@ -23,10 +24,7 @@ export interface ImmutableSession extends Session {
|
|
|
23
24
|
refreshToken?: string;
|
|
24
25
|
idToken?: string;
|
|
25
26
|
accessTokenExpires: number;
|
|
26
|
-
zkEvm?:
|
|
27
|
-
ethAddress: string;
|
|
28
|
-
userAdminAddress: string;
|
|
29
|
-
};
|
|
27
|
+
zkEvm?: ZkEvmInfo;
|
|
30
28
|
error?: string;
|
|
31
29
|
}
|
|
32
30
|
|
|
@@ -242,7 +240,7 @@ export function useLogin(): UseLoginReturn {
|
|
|
242
240
|
idToken?: string;
|
|
243
241
|
accessTokenExpires: number;
|
|
244
242
|
profile: { sub: string; email?: string; nickname?: string };
|
|
245
|
-
zkEvm?:
|
|
243
|
+
zkEvm?: ZkEvmInfo;
|
|
246
244
|
}) => {
|
|
247
245
|
const result = await signIn(IMMUTABLE_PROVIDER_ID, {
|
|
248
246
|
tokens: JSON.stringify(tokens),
|