V
V
Vladimir Golub2020-01-09 14:44:03
Node.js
Vladimir Golub, 2020-01-09 14:44:03

Do I need to redirect to the login/password page for a 401 error?

Do I need to redirect to the login/password page for a 401 error?
At 403 it is necessary. How to properly handle 401 errors?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Decadal, 2020-01-09
@Decadal

Well, if you're a backend, it's up to the front to redirect or not. You do not know what other parameters he wants to specify? For example, he wants to additionally transfer the URL to which he needs to transfer after login - this is important if the user sends a link to the messenger to another user, and he is not logged in from the phone. It is convenient when, after login, he still follows the link and not the main one.
And the backend only sends a response with the 401 code and this is where its work is finished

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question