title: Implementing SSO on React-Redux app
body: <p>I'm trying to implement SSO on a React-Redux app using Keycloak as an external Identity Provider. The intent is to redirect to the IdP's login page if the user is not authenticated and after successful authentication use the access_token to access protected resources on another REST API microservice.</p>
  
  <p>I tried to use Keycloak's NodeJS adapter (<a href="https://keycloak.gitbooks.io/documentation/securing_apps/topics/oidc/nodejs-adapter.html" rel="nofollow noreferrer">https://keycloak.gitbooks.io/documentation/securing_apps/topics/oidc/nodejs-adapter.html</a>) and it is able to redirect me to the IdP for logging in and I can get the access_token but this all happens in the express-session and uses the MemoryStore. I was wondering if this is okay? Saving JWTs in the express store and retrieving them from the store while making an API call?</p>
  
  <p>Or should I try doing something like saving the authentication status (JWT token) in Redux's store? Would it be better when compared with session cookies? Session cookies might be more secure but would involve accessing the store every time, right?</p>
  
  <p>Above all, how can I achieve the approach where Redux store has the JWT?</p>
  
  <p>Any help would be much appreciated.</p>
  
  <p>Thanks in advance. </p>