Can I add a Custom Claim in the Universal Login (HTML)?

I am using the Customize Login Page under Universal Login, where you can basically create whatever HTML, CSS, Javascript code you want for the users login.

I need to pass information back to the App once the user clicks the “Login” button…

  • Whether this was a Login or (new user) Signup
  • Whether the “Remember Me” checkbox was selected

I am able to add a “Custom Claim” to a “Custom Login Action” then add that Custom Action to the Login flow.

However, at that point in the login flow we don’t know whether the user had the “Remember Me” checkbox checked.

Is there a way to create the “Custom Claim” in the Universal Login HTML code?

If not, is there ANY WAY to pass info from the Custom Universal Login to the Web App?

Hi @geoff2,

Thanks for reaching out to the Auth0 Community!

Unfortunately, there is no way to create custom claims through the Universal Login HTML code. Instead, you must use a Post-Login Action to append the custom claims to the tokens, as you have found.

Moreover, the data you can get in the Post-Login Action only include the following fields found here.

The fields do not have a way to pass the “Remember Me” option from your Custom Universal Login Page to your Web App.

Please let me know if you have any questions.

Thank you.

1 Like