Auth0 apostrophe in email

Hi! We have a client that registered to auth0 with an email that has an apostrophe and is unable to open the “reset password” email.

Steps to reproduce:

  1. Create a user with an apostrophe in the email from The API:

     const { ManagementClient, AuthenticationClient } = require('auth0');
     const aClient = new AuthenticationClient({...credentials});
     const mClient = new ManagementClient({...credentials});
     // create function
     const user = await mClient.createUser({email: "namela’name@gmail.com", name: "Name La’name"}) // user created successfully
     await aClient.requestChangePasswordEmail({email,...credentials}); // reset password link is sent to user email
    
  2. User clicks on the set password link in the Email > receives blank page. In the console, we see a SyntaxError

Can the issue be related to the apostrophe? user without apostrophe are able to open the link successfully.

Hi @shulamit.ferber

Can you check if your Universal Login password reset page https://manage.auth0.com/#/password_reset has the Customize toggle enabled and contains the following code for the email?

  new Auth0ChangePassword({
      container:         "change-password-widget-container",                // required
      email:             "{{email | escape}}",                              // DO NOT CHANGE THIS

If the email is enclosed in single quotes and does not contain the | escape part try adding it to see if it helps with this issue.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.