File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
demo/redirect-flow-example/src Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -142,11 +142,7 @@ function App() {
142142 await passkeyPlugin . initWithMpcCoreKit ( coreKitInstance ) ;
143143 setIsLoading ( false ) ;
144144 }
145- if ( coreKitInstance . status === COREKIT_STATUS . LOGGED_IN ) {
146- await setupProvider ( ) ;
147- setUserInformation ( ) ;
148- setIsLoading ( false ) ;
149- }
145+ setupProviderPostLogin ( ) ;
150146
151147 if ( coreKitInstance . status === COREKIT_STATUS . REQUIRED_SHARE ) {
152148 navigate ( "/recovery" ) ;
@@ -158,6 +154,14 @@ function App() {
158154 setCoreKitStatus ( coreKitInstance . status ) ;
159155 } ;
160156
157+ const setupProviderPostLogin = async ( ) => {
158+ if ( coreKitInstance . status === COREKIT_STATUS . LOGGED_IN ) {
159+ await setupProvider ( ) ;
160+ setUserInformation ( ) ;
161+ setIsLoading ( false ) ;
162+ }
163+ }
164+
161165 useEffect ( ( ) => {
162166 const checkForRecoveryInitiation = async ( ) => {
163167 if ( coreKitInstance . status === COREKIT_STATUS . REQUIRED_SHARE ) {
@@ -168,6 +172,7 @@ function App() {
168172 }
169173 }
170174 checkForRecoveryInitiation ( ) ;
175+ setupProviderPostLogin ( ) ;
171176 } , [ coreKitStatus ] )
172177
173178 useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments