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

Create account - user-agent based error #2139

Merged
merged 4 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/pds/src/api/com/atproto/server/createAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export default function (server: Server, ctx: AppContext) {
},
handler: async ({ input, req }) => {
const hasAvailability = await ctx.signupLimiter.hasAvailability()
// temporary hack: don't queue android users (user-agent `okhttp/*`) since the latest version of app isn't rolled out on that platform yet
if (!hasAvailability && req.header('user-agent')?.startsWith('okhttp/')) {
throw new InvalidRequestError(
`We've had a burst of activity and are temporarily limiting signups. Please check back soon!`,
)
}

const {
did,
Expand Down
Loading
Loading