You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "GayathriSrividya (via GitHub)" <gi...@apache.org> on 2026/06/03 17:18:14 UTC

[PR] SimpleAuthManager: preserve deep-link next URL on first login [airflow]

GayathriSrividya opened a new pull request, #67965:
URL: https://github.com/apache/airflow/pull/67965

   Fixes #67476\n\nWhen unauthenticated users open a deep link, some login paths call get_url_login(next_url=...).\nSimpleAuthManager ignored this kwarg, so it always redirected to /auth/login or /auth/token/login\nwithout preserving next, which led to landing on homepage after first login.\n\nThis change makes SimpleAuthManager.get_url_login honor optional next_url by appending\na URL-encoded next query parameter for both regular and all-admin login endpoints.\n\nAdded unit tests for:\n- regular login with next_url\n- all-admin login with next_url\n\nValidation:\n- /opt/homebrew/bin/ruff format + check --fix passed\n- Local pytest run failed in this workspace due missing test dependency: tests_common\n\n- [x] I used AI assistance to help prepare this PR.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SimpleAuthManager: preserve deep-link next URL on first login [airflow]

Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck commented on PR #67965:
URL: https://github.com/apache/airflow/pull/67965#issuecomment-4615024024

   Fixed in https://github.com/apache/airflow/pull/67483?


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SimpleAuthManager: preserve deep-link next URL on first login [airflow]

Posted by "vincbeck (via GitHub)" <gi...@apache.org>.
vincbeck merged PR #67965:
URL: https://github.com/apache/airflow/pull/67965


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] SimpleAuthManager: preserve deep-link next URL on first login [airflow]

Posted by "GayathriSrividya (via GitHub)" <gi...@apache.org>.
GayathriSrividya commented on PR #67965:
URL: https://github.com/apache/airflow/pull/67965#issuecomment-4615518831

   Good question. I checked this against #67483, and there is still a gap this PR covers.
   
   What #67483 fixed:
   - It updated the /auth/token/login route to honor a next query param *if present*.
   
   What it did not change:
   - SimpleAuthManager.get_url_login still ignored next_url and always returned /auth/login or /auth/token/login without appending next.
   
   Why this still matters:
   - FAB call sites already pass next_url into get_url_login:
     - providers/fab/src/airflow/providers/fab/www/auth.py
     - providers/fab/src/airflow/providers/fab/www/extensions/init_appbuilder.py
   - Because SimpleAuthManager discarded next_url, deep-link context was lost before reaching /auth/token/login.
   
   So #67483 handles consumption of next, while this PR handles propagation of next into the login URL generation path.
   
   ---
   Drafted-by: GitHub Copilot (GPT-5.3-Codex) (no human review before posting)
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org