parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Add email verification docs

Open thamer898 opened this issue 10 years ago • 53 comments

Hello

I have parse 2.1.6 how to configure user reset password can you help me please ?

Regards

thamer898 avatar Mar 16 '16 18:03 thamer898

I've the same issue, running the following code with the latest Parse Server results in {"code":1,"message":"Internal server error."}

[PFUser requestPasswordResetForEmailInBackground:@"[email protected]" block:^(BOOL succeeded, NSError *error) {}];

felipeandradebezerra avatar Mar 16 '16 19:03 felipeandradebezerra

Hello @drew-gross

can you help us please to solve this issue ? to configure rest password using latest parse server edition ?

Regards

thamer898 avatar Mar 16 '16 19:03 thamer898

I am pretty sure this feature is experimental. No documentation about it yet.

noder199 avatar Mar 16 '16 20:03 noder199

Hello @noder199

yes i agree with you but i think there is a configuration smaple that mentioned in 2.1.6 v of parse server ?

Regards

thamer898 avatar Mar 16 '16 20:03 thamer898

Haven't done it myself, but take a look at #275 .

noder199 avatar Mar 16 '16 20:03 noder199

@noder199 i posted a question on #275 to query about the latest configuration details ?

thamer898 avatar Mar 16 '16 20:03 thamer898

Ok guys,

I'm completely newbie to nodeJS. Setup following in index.js of my instance of parse-server-example%


var SimpleMailgunAdapter = require('parse-server/lib/Adapters/Email/SimpleMailgunAdapter');
var api = new ParseServer({
  ....
  emailAdapter: new SimpleMailgunAdapter({
    apiKey: 'apiKey got from mailgun.com dashboard',
    domain: 'domain got from mailgun.com dashboard',
    fromAddress: 'email'
  }),
 .....
});

And so it worked, but not completely: I received broken email: undefined/apps/V8JPb9vSVENYgxbJkSfoqVZwa2FkdRtucsYlTajK/request_password_reset?token=mT41QGAGnh65PcsHkyQ4pfysi&username=example%40example.com

I've tried to set http://myip:myport/servername instead of undefined manually, but it isn't working. If you'll go further please notify me.

batkov avatar Mar 17 '16 14:03 batkov

It's working!

Key attributes: appName, publicServerURL, serverURL Custom page: new_password.html on line 160 change to var base = "http://IP/parse"

var api = new ParseServer({
  databaseURI: databaseUri || 'mongodb://localhost:27017/data',
  cloud: process.env.CLOUD_CODE_MAIN || __dirname + '/cloud/main.js',
  appId: '',
  masterKey: '',
  javascriptKey: '',
  restAPIKey: '',
  dotNetKey: '',
  clientKey: '',
  fileKey: '',
  serverURL: 'http://IP/parse',
  appName: "",
  publicServerURL: "http://IP/parse,
  emailAdapter: new SimpleMailgunAdapter({
    apiKey: '',
    domain: '',
    fromAddress: ''
  }),
  customPages: {
    invalidLink: 'http://yourpage/link_invalid.html',
    verifyEmailSuccess: 'http://yourpage/verify_email_success.html',
    choosePassword: 'http://yourpage/new_password.html',
    passwordResetSuccess: 'http://yourpage/sucess.html'
  }
});

felipeandradebezerra avatar Mar 17 '16 19:03 felipeandradebezerra

Hello @felipemobile

Great work , can you explain about the html files and where i can get these files to redirect the user to it ?

Regards

thamer898 avatar Mar 17 '16 19:03 thamer898

Hi @thamer898

You can get those HTML templates on the Parse dashboard

https://dashboard.parse.com/apps/{YOUR APP NAME}/settings/hosting

Customize User-Facing Pages

felipeandradebezerra avatar Mar 17 '16 21:03 felipeandradebezerra

Hello @felipemobile

yes i found the page but the html which displayed is blank do you have any ready or i should do it by myself ?

Regards

thamer898 avatar Mar 17 '16 21:03 thamer898

@thamer898

You can download all templates in HTML format from Parse Dashboard. There is a small link bellow each section. The only file that needs to be updated is the recovery password html.

felipeandradebezerra avatar Mar 17 '16 23:03 felipeandradebezerra

You actually don't need those pages, they should be served by default

flovilmart avatar Mar 17 '16 23:03 flovilmart

@felipemobile I believe that issue should be closed only after good tutorial would be written.

batkov avatar Mar 18 '16 08:03 batkov

@batkov It was closed by @gfosco since there are multiple threads about this issue.

felipeandradebezerra avatar Mar 18 '16 14:03 felipeandradebezerra

Hello @felipemobile @batkov @gfosco

yes i agree with @batkov if this issue solved by good written tutorial i think all the problems will be solved .

Regards

thamer898 avatar Mar 18 '16 14:03 thamer898

This feature depends on the experimental MailAdapters feature. You can find additional in-progress documentation at https://github.com/ParsePlatform/parse-server/issues/527#issuecomment-193335014.

If this feature moves out of the experimental phase, we can reopen this.

hramos avatar Mar 18 '16 22:03 hramos

I've been scratching my head for a while as to how to get password resets working - see my documented frenzy at 554 if you wish. Anyhow, I finally figured out most of it yesterday and, having just now stumbled upon the holy grail that is this thread, bid you for an answer to the final piece. I've setup appName, emailAdapter (with sendgrid),and publicServerURL which gets me to Exhibit A below. I get an email (it has an imaginary image in it for some reason - how do I get rid of that?) that gives me a url. I click it and am taken to Exhibit B. I enter my new password and am taken to Exhibit C. I don't get a confirmation email and when I try to use the new password client side the login is rejected as if the password was never updated. The Beatles


passwordreset


zeluspudding avatar Mar 19 '16 23:03 zeluspudding

@zeluspudding as we said, this feature is experimental, undocumented and may have bugs.

flovilmart avatar Mar 19 '16 23:03 flovilmart

I'll tell the boss. Grazie.

zeluspudding avatar Mar 19 '16 23:03 zeluspudding