Skip to content

Reset Password - MailGun & Parse-Server #1410

Closed

Description

@bgengs

Hello World,

Currently working on a side project with the parse server. I cloned the "example parse server application", migrated my parse.com hosted data and everything is running smooth on my localhost and the Digital Ocean backend. I've successfully installed the mail-gun adapter and will receive an email when the parse php sdk - password reset option is "initiated" by the user. The problem is, the link within the email sent by mail-gun, doesn't work. "500 External Server Error" or "{error: unauthorized}". I added the cloud code but for some reason it will not init. Any help would be greatly appreciated - if your looking for side work shoot me a message.

var server = ParseServer({ verifyUserEmails: true, publicServerURL: 'https://example.com/parse', appName: 'Parse App', emailAdapter: { module: 'parse-server-simple-mailgun-adapter', options: { fromAddress: 'parse@example.com', domain: 'example.com', apiKey: 'key-mykey', }}});

Activity

  1. bgengs commented on Apr 7, 2016

    @bgengs
    Author

    image

    image

  2. drew-gross commented on Apr 7, 2016

    @drew-gross
    Contributor

    You shouldn't need any cloud code for reset emails. This doesn't look like a Parse Server error though. Do you have any URL rewriting in nginx? Have you checked that your publicServerURL is correct? I can't see your full URL in that screenshot so I can't tell.

  3. bgengs commented on Apr 7, 2016

    @bgengs
    Author

    @drew-gross Thank you for the reply. I don't need cloud code for reseting emails? I thought to be able to send "reset password emails" you needed to use mailgun? Especially with parse-server hosted on your own server... I do not have any URL rewriting enabled in nginx. The PublicServerURL is correct - does Parse-Server automatically implement URL rewriting? I've been digging in the parse server files / node modules, their isn't a "View/Route" for sending reset emails...

    https://github.com/ParsePlatform/parse-server-example

    It's getting to the point where I'm going to remove the parse server example and redo the entire installation from scratch / git.

  4. drew-gross commented on Apr 7, 2016

    @drew-gross
    Contributor

    The requestPasswordReset function can be called from the client. You need configuration for the email adapter, but no Parse.Cloud.define() calls. Try calling the requestPasswordReset function from the client and see if that helps.

    If you are checking out the code for password resets, you can find it here:

    https://github.com/ParsePlatform/parse-server/blob/7afc08abe4914482e790054f78d5ae112e554222/src/Routers/PublicAPIRouter.js

  5. bgengs commented on Apr 7, 2016

    @bgengs
    Author

    @drew-gross Thank you so much man, means the world. After reviewing the nginx logs theirs seems to be some type of problem with your original idea of nginx rewriting. Even tho the Parse server is functional and accessible by the app, it seems that the URL rewriting is the problem. Looking / Researching to fix this issue now, will keep you posted.

    image

    image

  6. bgengs commented on Apr 7, 2016

    @bgengs
    Author

    @drew-gross Simple Mistake - needed to add this to nginx - thanks again man!

    location /parse {
    proxy_pass http://localhost:1337;
    }

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