When user clicks verify email button on email they received, browser opens the example.com/verify-email?t=1234 link.
1) CSR: app is hydrated and fetchCurrentUser is fetched
2) EmailVerificationPage: loadData calls verify thunk function
a) sdk.currentUser.verifyEmail is called first
b) and then fetchCurrentUser.
Recently, we removed double calls to fetchCurrentUser, by applying a small buffer, when subsequent calls to fetchCurrentUser actually make the call. (This can happen on pages that needs to fetch currentUser inside their loadData function).
Unfortunately, it was forgotten that email verification has a requirement for the order of those calls: (verify call first, and fetchCurrentUser second). This PR enforces the call of fetchCurrentUser on EmailVerificationPage.
When user clicks verify email button on email they received, browser opens the example.com/verify-email?t=1234 link.
1) CSR: app is hydrated and fetchCurrentUser is fetched 2) EmailVerificationPage: loadData calls verify thunk function a) sdk.currentUser.verifyEmail is called first b) and then fetchCurrentUser.
Recently, we removed double calls to fetchCurrentUser, by applying a small buffer, when subsequent calls to fetchCurrentUser actually make the call. (This can happen on pages that needs to fetch currentUser inside their loadData function).
Unfortunately, it was forgotten that email verification has a requirement for the order of those calls: (verify call first, and fetchCurrentUser second). This PR enforces the call of fetchCurrentUser on EmailVerificationPage.