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

resetPassword: Permission denied for this action.

Open andresgarza opened this issue 10 years ago • 4 comments

Environment Setup

parse-server v2.2.2

Steps to reproduce

  • Setup email adapter according to README instructions
  • Request password reset email
  • Click on link to go to choose_password page
  • Attempt to submit password

Logs/Trace

No logs/errors on server by default, but by running the server locally, I was able to determine the userController.updatePassword in the PublicAPIRouter catches the Permission denied for this action. error and redirects back to the choose password page.

andresgarza avatar Mar 27 '16 05:03 andresgarza

@carmenlau ?

flovilmart avatar Mar 27 '16 13:03 flovilmart

I was able to the reset password use case to work with SimpleMailgunAdapter. I did have to debug some of the internals though.

Setting the following arguments that must be passed to the ParseServer ctor solved all the permission denied stuff.

publicServerURL: process.env.PUBLIC_SERVER_URL || 'http://localhost:1337/parse'

appName: process.env.APP_NAME || '<your app name?'

emailAdapter: simpleMailgunAdapter

I set publicServerURL to be the same as serverURL. Didn't really understand the need for both but if you don't set the publicServerURL it all doesn't work.

seryoni avatar Mar 27 '16 16:03 seryoni

flovilmart already answered my question below on a different thread. Looks like the documentation on the main project thread got updated with more details.

seryoni avatar Mar 27 '16 18:03 seryoni

@seryoni / @flovilmart I'm actually passing all those options, but I figured out what the actual problem was: it seems like the latest package in NPM was released before bunch of commits needed for the password reset to correctly work.

@flovilmart / @gfosco since the README already mentions how to setup email for password resets, could we release a new version of the npm package?

andresgarza avatar Mar 27 '16 22:03 andresgarza