Skip to content

Commit e1eb57f

Browse files
committed
fix: update typo and address cusor comment
1 parent 5d11a85 commit e1eb57f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mpcCoreKit.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
335335
}
336336

337337
if (this.state.factorKey) {
338-
throw CoreKitError.oauthLoginUnsupported("Instance is alreay login or rehydrated");
338+
throw CoreKitError.oauthLoginUnsupported("Instance is already logged in or rehydrated");
339339
}
340340

341341
const { importTssKey, registerExistingSFAKey } = params;
@@ -404,6 +404,11 @@ export class Web3AuthMPCCoreKit implements ICoreKit {
404404

405405
public async loginWithJWT(params: JWTLoginParams): Promise<void> {
406406
this.checkReady();
407+
408+
if (this.state.factorKey) {
409+
throw CoreKitError.oauthLoginUnsupported("Instance is already logged in or rehydrated");
410+
}
411+
407412
const { prefetchTssPublicKeys = 1 } = params;
408413
if (prefetchTssPublicKeys > 3) {
409414
throw CoreKitError.prefetchValueExceeded(`The prefetch value '${prefetchTssPublicKeys}' exceeds the maximum allowed limit of 3.`);

0 commit comments

Comments
 (0)