Logo-amall

Hi guys, I'm trying to make the resetPassword from nhost Auth work on my flutter app. I couldn't figure out how to update the URL that the email redirects to my own url. the parameter "redirectTo" from the package throws an exception every time I try to enter my own url in there. Unhandled Exception: ApiException: apiUrl=MYPROJECTURL/v1/auth/user/password/reset, statusCode=400, responseBody={status: 400, message: "options.redirectTo" with value "http://test/resetpass" fails to match the required pattern: /^http:\/\/localhost:3000/, error: invalid-request} and if I leave the redirectTo as null, it will send an email that redirects to localhost:3000

Last active 4 months ago

4 replies

5 views

  • FL

    Hi guys, I'm trying to make the resetPassword from nhost Auth work on my flutter app.
    I couldn't figure out how to update the URL that the email redirects to my own url.

    the parameter "redirectTo" from the package throws an exception every time I try to enter my own url in there.

    Unhandled Exception: ApiException: apiUrl=MYPROJECTURL/v1/auth/user/password/reset, statusCode=400, responseBody={status: 400, message: "options.redirectTo" with value "http://test/resetpass" fails to match the required pattern: /^http:\/\/localhost:3000/, error: invalid-request}

    and if I leave the redirectTo as null, it will send an email that redirects to localhost:3000

  • SH

    did you set allowedredirecturls in config.yaml (for local development with cli)?

  • SH

    and for a live project you need to set that in the nhost dashboard

  • FL

    it worked, thank you. was missing to update it at the panel

Last active 4 months ago

4 replies

5 views