S
S
Sergey Zenkovich2020-12-30 04:39:59
User identification
Sergey Zenkovich, 2020-12-30 04:39:59

How to correctly implement user registration and login?

How to correctly implement the registration and login of the user on the site? As I understand it, all the emphasis should be on creating an API. And do I understand correctly that when registering in the database, you need to create an object and bind all data created by the user to this object? And at the entrance to make a request to the server, check the entered login and password in the database and give the data of the logged in user? There is a sea of ​​information on the Internet and all of it is different. Is there any proven way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Ivanov, 2020-12-30
@JamesHatfield

It's not very clear what the API has to do with it.
In the simplest case, when creating a user, you write his data to the database, and when logging in, you check the login / password and do what is required in your system (start the session, issue a token, maybe something else)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question