Skip to content

Disable access for users with unverified email #1958

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
chderen opened this issue May 31, 2016 · 6 comments
Closed

Disable access for users with unverified email #1958

chderen opened this issue May 31, 2016 · 6 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@chderen
Copy link
Contributor

chderen commented May 31, 2016

Hi,
can i disable login for users with emailVerified=false on the server-side?

Thanks

@flovilmart
Copy link
Contributor

No you can't but a Pull Request would be welcome.

@FridaySG
Copy link

FridaySG commented Jun 4, 2016

@chderen What you could do as an alternative is enable anonymous users in your app and query that particular user as a cloud code call using the master key. If the email is verified then you can perform the login inside the completion block of the called cloud function.

Alternatively, you could even just log them out immediately with an error message if the email is not verified but that may be a dirtier method. If you need sample code for the cloud code method in the first solution I'd be happy to help.

@chderen
Copy link
Contributor Author

chderen commented Jun 5, 2016

@FridaySG @flovilmart Thanks.
because some reasons i made a custom branch for parse-server with custom changes :(
the way i resolve my problem was by adding two lines to the source code at Routers/UserRouter.js line 92:

if (user.emailVerified == false) throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'User email is not verified');

my thoughts are that the email verification on login is required.

@natanrolnik
Copy link
Contributor

@flovilmart this was implemented in the recently merged #2175 - I think you can close it.
Chezki @chderen, it will probably be available in the next release, 2.2.16.

@chderen
Copy link
Contributor Author

chderen commented Jul 5, 2016

Thanks

@natanrolnik
Copy link
Contributor

BTW, I guess you can close it also :)

@chderen chderen closed this as completed Jul 5, 2016
@mtrezza mtrezza added type:feature New feature or improvement of existing feature and removed type:improvement labels Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

5 participants