csp33 opened a new issue, #36832: URL: https://github.com/apache/airflow/issues/36832
### Apache Airflow version 2.8.0 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? When opening the log of a specific Airflow DAG/log/whatever (like `<my airflow host>/log?execution_date=<date>&task_id=<task_id>&dag_id=<dag_id>&map_index=<map_index>`), the user is redirected to the login page if he's not logged in. However, when the login is performed, the homepage of the webserver is shown, instead of the URL that was initially opened. ### What you think should happen instead? _No response_ ### How to reproduce 1. Enter into Airflow and copy the URL of a specific DAG (i.e `<my host>/dags/<my_dag>/grid`). 2. Log out 3. Paste the URL you copied -> you'll be redirected to the login page. 4. Login 5. See how you'll be redirected to the home page. ### Operating System Docker image ### Versions of Apache Airflow Providers _No response_ ### Deployment Official Apache Airflow Helm Chart ### Deployment details _No response_ ### Anything else? I found out that this logic is implemented in https://github.com/apache/airflow/blob/13b0930bf45faece076ef1b0c4e6fd14f2b17e16/airflow/providers/fab/auth_manager/fab_auth_manager.py#L349 https://github.com/apache/airflow/blob/13b0930bf45faece076ef1b0c4e6fd14f2b17e16/airflow/providers/fab/auth_manager/fab_auth_manager.py#L354 However, we're calling this function using `next` https://github.com/apache/airflow/blob/13b0930bf45faece076ef1b0c4e6fd14f2b17e16/airflow/www/auth.py#L119 Changing `next` to `next_url` should do the trick 😄 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
