refactor: added back support for did/PDS logins and passes the locale onto the oauth screen#1187
Conversation
fatfingers23
commented
Feb 8, 2026
- Handle input supports did/PDS logins and has some validation if it's a did or handle to show an error. Stripes the @ still
- Passes the locale onto the OAuth screen. Only works for en, fr-FR, and ja-JP. So does a check then defaults ot en
- Had a bug where reditect_to was not being passed for handle logins
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThis pull request introduces input validation and locale support to the authentication flow. The AuthModal component now validates handle inputs before OAuth redirects, displays error messages for invalid entries, and normalises input by trimming and removing special characters. Locale support is added throughout the authentication pipeline, including the OAuth redirect construction and server-side locale resolution constrained to supported locales (en, fr-FR, ja-JP). Translation strings for validation error messages are added to English locale files. The ATProto syntax validation library is integrated into the build configuration via Nuxt modules and Vite optimisation. 🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
app/components/Header/AuthModal.client.vue (1)
49-56:⚠️ Potential issue | 🟠 MajorOnly strip a leading “@” to avoid changing valid input.
Removing every “@” can turn an email-like string into a different, valid-looking handle and bypass the intended validation.Proposed fix
- const normalized = newHandleInput.trim().toLowerCase().replace(/@/g, '') + const normalized = newHandleInput.trim().toLowerCase().replace(/^@+/, '')
🧹 Nitpick comments (1)
server/api/auth/atproto.get.ts (1)
16-18: Replace the informal locale note with a concise description.
The current comment is conversational and doesn’t explain non-obvious logic. A short neutral note (or removal) would be clearer.As per coding guidelines, “Add comments only to explain complex logic or non-obvious implementations”.Proposed tidy-up
-//I did not have luck with other ones than these. I got this list from the PDS language picker +// Supported OAuth UI locales from the PDS language picker. const OAUTH_LOCALES = new Set(['en', 'fr-FR', 'ja-JP'])