AwsAuthManager.get_url_login() drops next_url parameter
Under which category would you file this issue?
Providers
Apache Airflow version
main (Airflow 3.0+)
Apache Airflow Provider(s)
amazon
What happened and how to reproduce it?
In AwsAuthManager.get_url_login(), the next_url parameter is currently dropped:
def get_url_login(self, **kwargs) -> str:
return urljoin(self.apiserver_endpoint, f"{AUTH_MANAGER_FASTAPI_APP_PREFIX}/login")
When callers (such as Airflow FastAPI/UI redirect handlers) call auth_manager.get_url_login(next_url=...), the next query parameter is not appended to the login URL.
While #77209 updated AwsAuthManager login routes to preserve and redirect to the next URL across SAML authentication callbacks, AwsAuthManager.get_url_login() itself was left without next_url handling.
Other auth managers in Airflow already support next_url in get_url_login():
KeycloakAuthManagerin #76362:if next_url := kwargs.get("next_url"): return f"{login_url}?{urlencode({'next': next_url})}"FabAuthManagerin #73134:next_url = kwargs.get("next_url") if next_url: return f"{login_url}?{urlencode({'next': next_url})}"SimpleAuthManagerin #67483
What you think should happen instead?
AwsAuthManager.get_url_login() should accept next_url via kwargs.get("next_url") and append ?next=<url> (URL-encoded) when present, aligning it with Keycloak, FAB, and Simple auth managers.
Operating System
Linux
Deployment
Other
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