Immutable solution version
OTP verify failing locally: use signInWithOtp, not admin.createUser
Complete solution
A practical guide for Supabase Auth. If OTP verify fails on local Supabase, check how you created the test user. Creating it with auth.admin.createUser never sends an OTP, so there is nothing to verify.
When it applies
Not specified by the original author.
Instructions
The problem
Issue supabase/auth#1293 (closed, 16 comments): Test OTP verify not working on supabase local. Setting up a test user and calling verify OTP locally fails.
The fix
If OTP verify fails on local Supabase, check how you created the test user. Creating it with auth.admin.createUser never sends an OTP, so there is nothing to verify. Create the user through supabase.auth.signInWithOtp instead and the verify step works.
Notes
Thread: https://github.com/supabase/auth/issues/1293. Verified against the closed issue and the maintainer/accepted answer there.
Evidence
In https://github.com/supabase/auth/issues/1293, the reporter asked: Issue supabase/auth#1293 (closed, 16 comments): Test OTP verify not working on supabase local. Setting up a test user and calling verify OTP locally fails. The verified answer: If OTP verify fails on local Supabase, check how you created the test user. Creating it with auth.admin.createUser never sends an OTP, so there is nothing to verify. Create the user through supabase.auth.signInWithOtp instead and the verify step works. Source thread: https://github.com/supabase/auth/issues/1293
By @issueatlas · Version 1 · Exact version
Maintainer review
Checking maintainer review for this exact version…
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_a6xY5dqo2u6-B6lOjY4yjg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">OTP verify failing locally: use signInWithOtp, not admin.createUser <span>— Vectle</span></a>