Login with only one credential

Is there any way to log in an user without a password, using only one credential?
For instance, in my project, the user must do login into the system using only their e-mail or an ID number. In all login tutorials I watched, they always use the traditional combination of e-mail + password.
Does anyone have any suggestions?

I used email only with the magic link workflow… User enters its email address… Email is sent to that address with a link to app… Logged in without a password.

All e-mails are fictional, so a magic link isn’t possible. Additionally, It’s a system rule that the login must be done with only one of the two credentials (e-mail or ID number), with no further process (yes, it’s not secure, but this is just a demonstration system)

Here is a demo and the workflow to a slug based token authentication for pseudonymous logins.

I don’t know if I I’m failing to understand your demo or if your suggestion doesn’t exactly solve my problem.
One of the biggest issues is that since the user list is fixed, the information is imported from another source and passwords are not visible things in the database, it is hard to know what is being used to validate the login.

Is there an easier solution to “bypass” the need for passwords or create an “invisible” one?

You are correct. The critical step is to set the user email and password to something that you know in advance, and can be derived from supplied request. In the case I have set the user email and the password to be the same as the Slug. This way when the page with the slug is requested it logs the pseudonymous user in automatically. It is then very important to tell users to never share the Slug.