docs icon indicating copy to clipboard operation
docs copied to clipboard

Further documentation on Require Username option for Custom Database connections would be helpful

Open johnsaigle opened this issue 3 years ago • 1 comments

Describe the problem you'd like to have solved

I would like a more precise explanation of how the "require username" toggle functions when using a custom database.

Describe the ideal solution

A clear explanation of how authentication works when using a custom database connection.

For example, on the Database Connections page, on the Custom Database tab, one is able to write custom code to create authentication functionality with an external database.

The login template has parameters for email and password but nothing for username. It's unclear to me how this is meant to be implemented when a user has the option to login with a username instead of an email.

Similarly, it's not clear how this information would be stored based on the Create a new user function template.

Alternatives and current work-arounds

I'm not sure! That's sort of the issue 😂 . I'll have to make a post on the Auth0 forums to figure this out.

Additional context

I believe that this page should have more information about how this works. It seems to be a natural place.

https://auth0.com/docs/connections/database/require-username

johnsaigle avatar Sep 29 '20 15:09 johnsaigle

For reference: I opened this as a topic on the Auth0 community forums along with an example. The solution there can be used to help assist with documentation.

https://community.auth0.com/t/how-does-require-username-work-for-custom-database-connections/50660

I would also suggest modifying the template to use e.g. identifier instead of email in the parameter name. Within the function template it should be clarified that the "identifier" is by default the email but could instead be a username value when "Require Username" is enabled.

This will assist those of us who are using custom databases as we will need to modify our queries depending on whether a username or an email is supplied.

johnsaigle avatar Sep 30 '20 14:09 johnsaigle