Answer the question
In order to leave comments, you need to log in
How to redirect after authorization to a previously requested resource?
You need one Chip,
this is quite common, so the question is how best to implement it or how do you do it?
A simple example:
A user accesses a protected resource, while he is not authorized. At the moment, after authorization, he gets to his account.
And it is necessary that he gets to the protected resource that he requested before.
Are there any ideas how to do it better?
Answer the question
In order to leave comments, you need to log in
By default, it works the way you want:
By default, the form will redirect to the URL the user requested (ie the URL which triggered the login form being shown). For example, if the user requestedhttp://www.example.com/admin/post/18/edit
, then after they have successfully logged in, they will be sent back tohttp://www.example.com/admin/post/18/edit.
Redirecting after Success¶
always_use_default_target_path
: Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question