I have a react web application running on a eks cluster. I have created a EKS alb ingress to authenticate users. I haven't figure out if I do so, how my react web application to know who is signed in. The ingress will forward some headers to the backend, not sure in my react web where to catch these headers? or I have to setup something on the web server? right now, I deploy the react web in development mode.
Asked
Active
Viewed 226 times
1 Answers
0
Please take a look for this one example with nginx and "auth_request Module"
As per tutorial:
The auth_request module sits between the internet and your backend server that nginx passes requests onto, and any time a request comes in, it first forwards the request to a separate server to check whether the user is authenticated, and uses the HTTP response to decide whether to allow the request to continue to the backend
In addition you can can use open source project “Vouch” to authenticate users via a variety of backends.
Using appropriate nginx configuration with vouch your server can handle both authentication using "HTTP header" and redirecting connection from "authenticated users" to the backend server.
Hope this help

Mark
- 3,644
- 6
- 23
-
Thanks, Hanx. I will take a look at the example. I'm new to reactjs too. it seems it all runs in the client side. there is a gap between backend and the react web front end. – L.T. Jun 07 '19 at 01:27
-
Hi, [L.T. ](https://stackoverflow.com/users/837047/l-t) what is the result of your investigation? – Mark Jun 18 '19 at 08:32