[Bug]: Slug path looses redirection param when user login fails
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
On a private app where a user has to login to access app, the redirection path gets lost when user login fails so user is redirected to the home page and not the app link
Steps To Reproduce
- Use a private shared link to access an app on incognito
- Cause a failed login attempt and notice the URL slug looses the
redirectionquery param - Logging in correctly now causes the user to land on the Appsmith homepage and not the shared app link. User needs to reenter the shared URL to land on the correct page


Public Sample App
No response
Issue video log
No response
Version
Cloud
Not related to clean url's. This is a general bug in the login flow. https://www.loom.com/share/e5384ee2938d4fb9b39e2f22bdaaf585
This is best addressed in the backend.
Problem:
Right now, upon login failure we don't send back the redirect url.
https://dev.appsmith.com/user/login?error=true
https://www.loom.com/share/71349aee40544fb5b465f25fc9cb701c
Solution:
It should include the redirect url for this to be fixed.
https://dev.appsmith.com/user/login?error=true&redirectUrl=https%3A%2F%2Fdev.appsmith.com%2Fapp%2Fprivate-app%2Fpage1-64101d008ceea003546887e4
https://www.loom.com/share/a5bd24aa541c4d578b265c09dec578e0
Tested this on the DP url, it's working as expected.
Seeing a 503 message after login. Need to refresh the page to see the app I was trying to access.

Is this related to the fix here? - or raise a separate issue?
cc: @Richarex, @NilanshBansal
This is not related @ramsaptami