Skip to content

Email Verification /verifyemail route #350

Description

@jmanlapid

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.

// returns the error message
{"message":"unauthorized"}
app.get('/verifyemail', function(req, res) {
  Parse.initialize('testappid', 'testjavascriptkey','testmasterkey');
  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);
  Parse.Cloud.run('hello', {}).then(function(res) {
    console.log(res);
  }, function(err) {
    console.error(JSON.stringify(err));
  });
  //res.status(200).send('i verified you, you goon!');
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions