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

Ensure handles are treated as case insensitive when signing in #126

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

tom-sherman
Copy link
Contributor

No description provided.

Copy link

vercel bot commented Sep 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontpage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 24, 2024 10:59am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
atproto-browser ⬜️ Ignored (Inspect) Visit Preview Sep 24, 2024 10:59am
unravel ⬜️ Ignored (Inspect) Visit Preview Sep 24, 2024 10:59am

@@ -14,6 +14,7 @@
},
"dependencies": {
"@atproto/oauth-types": "^0.1.2",
"@atproto/syntax": "^0.3.0",
Copy link
Contributor Author

@tom-sherman tom-sherman Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @atprotoification of our code begins lol.

I'm gonna gradually convert our handling of core protocol things (handles, DIDs, did doc and pds resolution etc.) to the official libraries but definitely still don't wanna use the API clients because they're not really suited to our use case.

damiensedgwick
damiensedgwick previously approved these changes Sep 24, 2024
JakeSaterlay
JakeSaterlay previously approved these changes Sep 24, 2024
Copy link
Contributor

@JakeSaterlay JakeSaterlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

let handleOrDid = identifier;
// Sanitize only handles
if (
isValidHandle(identifier) ||

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to strip whitespace too

are handles case sensitive or just want lowercase?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handles are case insensitive (like domain names) but dids are technical case sensitive.

@tom-sherman tom-sherman merged commit 63ef760 into main Sep 24, 2024
7 checks passed
@tom-sherman tom-sherman deleted the sanitize-handles branch September 24, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants