gopidesupavan commented on PR #47432:
URL: https://github.com/apache/airflow/pull/47432#issuecomment-2718953284

   > > Yes completely agree :), yes tried this one, when the control goes back 
to main app, the response header is not available to capture jwt token for next 
requests then this causing the issue its going to the loop here 
https://github.com/apache/airflow/blob/main/airflow/ui/src/main.tsx#L42 .
   > 
   > Yes I think we need to make some modifications on fastapi to capture the 
JWT token from the header but I definitely think this is possible. Then the 
backend needs to pass the token to front-end so that it can save it in local 
storage I would really prefer this solution over relying on auth manager to 
save the token. I can try an experiment today/tomorrow if I have time
   > 
   > > I have another idea, but I'm not sure if it's worth pursuing. If we can 
access the user and password details in the main app at 
https://github.com/apache/airflow/blob/main/airflow/ui/src/utils/tokenHandler.ts#L24,
 we could call the /auth/token endpoint and capture the jwt_token from the 
response. This token could then be stored in local storage for use in 
subsequent requests. However, I'm unsure how to capture the user/password 
details—whether they are available in the app or if we would need to make a 
database call to retrieve them based on the username. We can call this only 
first time when user login then for the remaining requests use token from the 
localStorage.
   > 
   > No I dont think this is where we want to go. We do not have access to user 
and password nor we should.
   
   Sure thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to