[GH-ISSUE #411] Bug: OIDC Account Linking Issue with Case-Sensitive Emails #267

Open
opened 2026-03-02 11:48:13 +03:00 by kerem · 4 comments
Owner

Originally created by @IamTaoChen on GitHub (Sep 23, 2024).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/411

I have a local account with the email AaBbCcDd@example.com, and when I use OIDC with OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING = true, it doesn't link to the same account because the email from OIDC is aabbccdd@example.com.

Originally created by @IamTaoChen on GitHub (Sep 23, 2024). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/411 I have a local account with the email `AaBbCcDd@example.com`, and when I use OIDC with `OAUTH_ALLOW_DANGEROUS_EMAIL_ACCOUNT_LINKING = true`, it doesn't link to the same account because the email from OIDC is `aabbccdd@example.com`.
Author
Owner

@kamtschatka commented on GitHub (Sep 23, 2024):

This is not really an issue with OIDC per se.
This also happens when you create accounts locally with "Asdf@example.com" and "asdf@example.com". We'll have to discuss how to solve this issue internally, but basically email addresses are case insensitive, so they should all be 1 account.

<!-- gh-comment-id:2368817081 --> @kamtschatka commented on GitHub (Sep 23, 2024): This is not really an issue with OIDC per se. This also happens when you create accounts locally with "Asdf@example.com" and "asdf@example.com". We'll have to discuss how to solve this issue internally, but basically email addresses are case insensitive, so they should all be 1 account.
Author
Owner

@MohamedBassem commented on GitHub (Sep 29, 2024):

@IamTaoChen As @kamtschatka said, unfortunately currently we do email comparisons in a case sensitive way. It might take us some effort to change this behavior, so we might not have enough time to get to it soon to be honest. If you want, we can help you modify your email in the database so that linking can work :)

<!-- gh-comment-id:2381052825 --> @MohamedBassem commented on GitHub (Sep 29, 2024): @IamTaoChen As @kamtschatka said, unfortunately currently we do email comparisons in a case sensitive way. It might take us some effort to change this behavior, so we might not have enough time to get to it soon to be honest. If you want, we can help you modify your email in the database so that linking can work :)
Author
Owner

@ChaoticSciuridae commented on GitHub (Mar 22, 2025):

@MohamedBassem

For my own edification. Can you offer insight into the challenges delaying resolution here? Beyond the obvious resource/time constraints that come with working on an open source project.

This seems like a simple matter of normalizing the email to lowercase or similar before making the comparison. If its just time I may be able to assist -- if you're open to it as this seems a doable task for me.

<!-- gh-comment-id:2744976404 --> @ChaoticSciuridae commented on GitHub (Mar 22, 2025): @MohamedBassem For my own edification. Can you offer insight into the challenges delaying resolution here? Beyond the obvious resource/time constraints that come with working on an open source project. This seems like a simple matter of normalizing the email to lowercase or similar before making the comparison. If its just time I may be able to assist -- if you're open to it as this seems a doable task for me.
Author
Owner

@Eragos commented on GitHub (Apr 20, 2025):

IMO it worked as designed and is not a bug (check out RFC 2822, section 2.2 for more details of the correct email address format)

<!-- gh-comment-id:2817267811 --> @Eragos commented on GitHub (Apr 20, 2025): IMO it worked as designed and is not a bug (check out [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822.html#section-2.2), section 2.2 for more details of the correct email address format)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#267
No description provided.