• caglararli@hotmail.com
  • 05386281520

Should I redirect user to login screen after validating email and first password?

Çağlar Arlı      -    58 Views

Should I redirect user to login screen after validating email and first password?

I'm working on authentication on the backend of an application and I want to know which of the following methods is the best.

After the user registers in the application an email is sent to the registered email with an OTP code to confirm the email address. Then the user has to input the OTP code followed by the password and confirmation password.

Now, after validating the OTP and the password, should I redirect the user to the login page to log in normally, or generate a JWT token and auto-log him in?