File tree 2 files changed +19
-5
lines changed
packages/clerk-js/src/core
2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @clerk/clerk-js ' : patch
3
+ ---
4
+
5
+ Handle two factor redirect when authenticate with web3 and multifactor has been enabled
Original file line number Diff line number Diff line change @@ -1808,11 +1808,20 @@ export class Clerk implements ClerkInterface {
1808
1808
}
1809
1809
}
1810
1810
1811
- if ( signInOrSignUp . createdSessionId ) {
1812
- await this . setActive ( {
1813
- session : signInOrSignUp . createdSessionId ,
1814
- redirectUrl,
1815
- } ) ;
1811
+ switch ( signInOrSignUp . status ) {
1812
+ case 'needs_second_factor' :
1813
+ await navigate ( 'factor-two' ) ;
1814
+ break ;
1815
+ case 'complete' :
1816
+ if ( signInOrSignUp . createdSessionId ) {
1817
+ await this . setActive ( {
1818
+ session : signInOrSignUp . createdSessionId ,
1819
+ redirectUrl,
1820
+ } ) ;
1821
+ }
1822
+ break ;
1823
+ default :
1824
+ return ;
1816
1825
}
1817
1826
} ;
1818
1827
You can’t perform that action at this time.
0 commit comments