-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Closed
Labels
area:CLIarea:corekind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
Description
Apache Airflow version
3.1.6
If "Other Airflow 3 version" selected, which one?
No response
What happened?
When copying the Airflow base URL from the browser address bar, it typically includes a trailing slash by default.
Using this URL directly with airflowctl auth login causes the client to construct the auth endpoint with a double slash (//auth), which results in a failed authentication request.
airflow/airflow-ctl/src/airflowctl/api/client.py
#@classmethod
def _get_base_url(
cls, base_url: str, kind: Literal[ClientKind.AUTH, ClientKind.CLI] = ClientKind.CLI
) -> str:
"""Get the base URL of the client."""
if kind == ClientKind.AUTH:
return f"{base_url}/auth"
return f"{base_url}/api/v2"What you think should happen instead?
No response
How to reproduce
Run airflowctl auth login with an --api-url value that ends with a trailing slash (/).
airflowctl auth login \
--username airflow \
--password airlfow \
--api-url http://localhost:8080/
2026-01-30 11:21:20 [warning ] Server error [airflowctl.api.client] extra={'detail': 'Method Not Allowed'}
Login failed: Client error message: {'detail': 'Method Not Allowed'}
Operating System
Darwin Kernel Version 25.2.0
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:CLIarea:corekind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet