0

I have an api project configured with oauth for authentication. since the application uses load balancer to manage multiple requests, let's assume (server-1 ad server-2).

first request with valid credentials => server 1 (here token was generated)

second request with token included in header => server 2

now second request getting "Authorization Denied". How to handle this scenario?

Aashu
  • 9
  • 3
  • Do you mean [this](https://stackoverflow.com/questions/25749818/sharing-oauth-tokens-across-two-web-api-projects)? Or do you actually plan for the load balancer to do the authentication? If the latter, it depends on the load balancer you use. – ProgrammingLlama Jul 02 '19 at 14:42
  • Hi john, in my case we are using load balancer to split requests based on network traffic. so the token created in server 1 is not valid in server2. Is there any kind of setting like reading oauth token from database. – Aashu Jul 02 '19 at 15:06

1 Answers1

0

Guess you are looking for something like vouch-proxy.

Here some useful links:

Article: https://medium.com/lasso/use-nginx-and-lasso-to-add-google-authentication-to-any-application-d3a8a7f073dd

Project: https://github.com/vouch/vouch-proxy

Ramon Medeiros
  • 2,272
  • 2
  • 24
  • 41