D
D
decvdence2021-05-31 21:29:56
Express.js
decvdence, 2021-05-31 21:29:56

What to give to the client after registration?

What is better to give to the client after writing a new user to the database?
Token and user data? Or is it just a message like “everything is OK, registration has passed”, and on the front, using the previously entered data, do authentication?
Advise good practices in this matter.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2021-05-31
@firedragon

It's good practice to give the user what he wants right away. That is, he registered from the forum page and immediately after registration he can write or place an order and a link to his personal account fell on the soap.

T
Tigran Abrahamyan, 2021-06-01
@TAbrahamyan

If you plan to send the user to the page of authenticated users immediately after registration, then give him the token and data.
If not, then just a message about successful registration.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question