I have implemented or extended on top of Spring Authorization server. I have a authentication controller that accesses the client-id from the RequestCache object.
Now, I have built a sample OAuth app that redirects to Spring Authorization server for login. I use the requestCache to access the client-id but after a while the requestCache does not contain the client-id anymore either because of session timeout or in activity. Where do I store this client-id? I tried session attribute but that times out too on inactivity. What is the best way to handle this scenario so I always have the client-id value for a user?
This is the workflow (added after original post):
- user clicks on a app link (Dashboard) that requires login
- If not logged-in redirects to OAuth2 (My Spring Authorization Server). This is what I observe in the Developer Tool console on Chrome
a. Goes to
http://localhost:3000/response_type=code&client_id=myclientid&scope=read&state=some-state&redirect_uri=http://127.0.0.1:3000/login/oauth2/code/client-id-oidcb. Then redirects to http://localhost:3000/issuer (this url shows my login page)
c. I want to add this to the login-url and show "http://localhost:3000/issuer?client_id=myclientid
How do I get that done?