Skip to content

Impossible to check if email was verified #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thierry-tct opened this issue Apr 21, 2019 · 3 comments
Closed

Impossible to check if email was verified #159

thierry-tct opened this issue Apr 21, 2019 · 3 comments

Comments

@thierry-tct
Copy link

The field emailVerified present in the User object returned by Parse Server is never existing here in the ParseUser class.

How can we check that the email is verified?

@RodrigoSMarques
Copy link
Contributor

Hi @thierry-tct

Try this:

  final currentUser = await ParseUser.currentUser() as ParseUser;
  print('EmailVerified: ${currentUser.get("emailVerified")}');

Value can be null, careful when making validations

@thierry-tct
Copy link
Author

@RodrigoSMarques Thanks much. That works perfectly.

@RodrigoSMarques
Copy link
Contributor

@thierry-tct
Version 20 released today has a new method for verifying:

  final currentUser = await ParseUser.currentUser() as ParseUser;
  print('EmailVerified: ${currentUser.emailVerified}');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants