-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Email Verification /verifyemail route #350
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
Comments
You shouldn't need to re-initialize Parse (or re-define it) as we've mutated the global |
Thanks for the feedback @gfosco. I have removed that line but still getting the error unauthorized message. To clarify, the link I am sending to the user's email after the signup does not have any keys in it (javascript/master key). Its strictly just http://example.com/verifyemail?userId=xxxx&email=xxxx&username=xxxx. I also tried making a direct Parse query instead of calling a Parse Cloud function. //verify email
app.get('/verifyemail', function(req, res) {
var query = require('url').parse(req.url,true).query;
var userId = query.userId;
var username = query.username;
var email = query.email
console.log(userId, username, email);
new Parse.Query(Parse.User)
.get('objectId', userId).then(function(res) {
res.status(200).send(res.toJSON());
}, function(err) {
res.status(200).send(JSON.stringify(err));
});
}); |
It actually depends on when you are mounting your endpoint - if it happens after middleware that checks the authentication on keys - it will check for key authentication on every endpoint. |
Closing this since it has been a while... If you're still having an issue with 2.1.3+, please open a new issue with more details. Thanks. |
Hi all,
I have this route sitting in my index.js file handling email verification links like such http://example.com/verifyemail?userId=xxxx&email=xxxx&username=xxxx. The route fires, however when I try to call a cloud function it say its unauthorized. I also tried have the user query right there in the route scope but no luck.
The text was updated successfully, but these errors were encountered: