Skip to content

Commit

Permalink
look up user again in case email confirmed in another browser #8582
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Apr 11, 2022
1 parent afc87b4 commit 904a4e7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public class ConfirmEmailServiceBean {
* @return true if verified, false otherwise
*/
public boolean hasVerifiedEmail(AuthenticatedUser user) {
// Look up the user again in case the "verify email" link was clicked in another browser.
user = authenticationService.findByID(user.getId());
boolean hasTimestamp = user.getEmailConfirmed() != null;
boolean isVerifiedByAuthProvider = authenticationService.lookupProvider(user).isEmailVerified();
// Note: In practice, we are relying on hasTimestamp to know if an email
Expand Down

0 comments on commit 904a4e7

Please sign in to comment.