Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git OAuth invalid login: Missing user name triggers 'NoneType' error #911

Open
2 tasks done
dev-whoan opened this issue Mar 24, 2025 · 0 comments · May be fixed by #912
Open
2 tasks done

Git OAuth invalid login: Missing user name triggers 'NoneType' error #911

dev-whoan opened this issue Mar 24, 2025 · 0 comments · May be fixed by #912
Labels
kind/bug kind - things not working properly

Comments

@dev-whoan
Copy link

Checks

Chart Version

8.9.0

Kubernetes Version

Client Version: v1.30.7
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.32.2-eks-bc803b4
WARNING: version difference between client (1.30) and server (1.32) exceeds the supported minor version skew of +/-1

Helm Version

version.BuildInfo{Version:"v3.17.0", GitCommit:"301108edc7ac2a8ba79e4ebf5701b0b6ce6a31e4", GitTreeState:"clean", GoVersion:"go1.23.4"}

Description

I was trying to set up Git OAuth authentication for Airflow, but then I ran into an Invalid Login error whenever a user did not have a name field in user_data. This caused a 'NoneType' object has no attribute 'split' error in the authentication flow.

After investigation, I discovered that if the user_data["name"] is missing or None, the code attempts to call split() on None. The fix is to fall back to using the local part of the primary email address (the portion before the @) as the user's first name when user_data["name"] is unavailable.

I would like to suggest updating the documentation/FAQ to mention this behavior and provide a clear workaround or fix for those encountering this error. Below is a brief outline of the fix:

Retrieve the primary email address from the user's email data.

Check if user_data["name"] exists and is not None.

If it does not exist, use the local part of the email address (before @) as the user's first name.

This resolves the invalid login issue by ensuring we always have a fallback for the user’s name.

Relevant Logs

Custom Helm Values

@dev-whoan dev-whoan added the kind/bug kind - things not working properly label Mar 24, 2025
@dev-whoan dev-whoan linked a pull request Mar 24, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug kind - things not working properly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant