I'm trying to invite users via supabase.auth.admin.inviteUserByEmail() but it consistently hangs and returns a 504.
Environment
What I'm trying to do
Call inviteUserByEmail() from a Next.js server action using the service role client to invite new staff users.
What's going wrong The request hangs for ~30 seconds then throws:
AuthRetryableFetchError: {}
__isAuthError: true, status: 504, code: undefined
What I've ruled out
admin.auth.admin.createUser() works instantly on the same project with the same service role clientSeems like the invite endpoint specifically is broken on my project while everything else functions normally. Any idea what could cause this?
Tags: bug, auth, server-side
The user is experiencing a consistent 504 error when using supabase.auth.admin.inviteUserByEmail() in a Next.js environment. Other auth functions like createUser() work fine, and the issue persists even when using the dashboard. The user suspects the invite endpoint is broken for their project.
Have you got a custom smtp or using the default? If you’re on the default you may be hitting the rate limit.
Also what are your Auth logs looking like, any errors?