Skip to content
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

Email verification does not trigger LiveQuery event #3850

Closed
davidrichard23 opened this issue May 23, 2017 · 4 comments · Fixed by #3851
Closed

Email verification does not trigger LiveQuery event #3850

davidrichard23 opened this issue May 23, 2017 · 4 comments · Fixed by #3851
Assignees

Comments

@davidrichard23
Copy link

davidrichard23 commented May 23, 2017

Issue Description

I'm trying to lock users out until they verify their email. I would like to use LiveQuery so I can give user access to the rest of the app once they verify. The problem is that the email verification link does not trigger the LiveQuery update(or enter) event. It also doesn't update the updatedAt key on the user object.

If I use the Parse Dashboard to manually change the emailVerified key, the LiveQuery update event gets triggered and the updatedAt key also gets updated.

Steps to reproduce

let query = new Parse.Query(Parse.User);
query.equalTo('objectId', <user objectId>)
query.equalTo('emailVerified', true)
const subscription = query.subscribe();

subscription.on('enter', (object) => {
        console.log('updated');
	subscription.unsubscribe();
});

subscription.on('open', () => {
	console.log('opened');
});

subscription.on('close', () => {
	console.log('closed');
});

Expected Results

The LiveQuery update/enter event to be triggered when the user verifies their email

Actual Outcome

The LiveQuery update/enter events are not triggered

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 2.4.0
    • Operating System: OS X 10.11.6
    • Hardware: Macbook Pro 2010
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Localhost
  • Database

    • MongoDB version: 3.2.10
    • Storage engine: wiredTiger
    • Hardware: Macbook Pro 2010
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): Localhost
@flovilmart
Copy link
Contributor

I have a pretty good idea of why this happen, do you want to work on a fix? I could assist you along the way!

@davidrichard23
Copy link
Author

It's a little intimidating, but I'm looking to become more involved. I'll give it a shot!

@flovilmart
Copy link
Contributor

Actually I managed to fix it, that was pretty trivial, with knowledge of the codebase.

@davidrichard23
Copy link
Author

Awesome, thanks!

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

Successfully merging a pull request may close this issue.

2 participants