Redirect to previous page after login

Asked on December 02, 2019
Hello All,
I have developed my application using micro service, spring boot , uaa and angular 4.
Problem:
I'm sending email to user, on click of the link it navigates to login page if the user is not logged in.
After logging in it redirects to home page instead of request page after login, I have used the hash location strategy.
As per my understanding before login in the url i can see the requested url but after login requested url will be disappeared. Please refer images i have attached here


Kindly please any one help me.
Thanks & Regards
Amruta Wandakar

Replied on December 03, 2019
Provide the code, how are you redirecting to requested URL after login.

Replied on December 03, 2019
Hi Mohit,
I'm using UAA and micro service concept with spring security in java. In angular I have not written code to redirect.
After login in the UAA one of the db specified the redirect uri.
In the zuul properties I have configured is as follows :
security:
user:
password: none
oauth2:
client:
accessTokenUri: http://localhost:8088/uaa/oauth/token
userAuthorizationUri: http://localhost:8088/uaa/oauth/authorize
clientId: clientId
clientSecret: ClientScrete
registered-redirect-uri: http://localhost:8088/login
pre-established-redirect-uri: http://localhost:8088/login
use-current-uri: false
In the Angular I have used hash(#) strategy. As I have used the hash strategy if the user is not logged it will redirect to login page but after login after hash whatever url is added will be disappeared.
Please help me to resolve this.