2
Support generating access_token for phone users via Admin API
Source: supabase/supabase#37008 · opened by @rohitsah01
Feature Request
Please add support to issue Supabase-compatible access_token and refresh_token for users authenticated by phone (SMS OTP) via the Admin API.
Use Case
In custom backend OTP flows (like verifying OTP manually from our DB), we want to programmatically issue a session token for a valid phone user without requiring the client to re-trigger Supabase's signInWithOtp.
This would allow:
• Server-side session creation for phone-authenticated users
• Avoiding duplicate OTP messages
• *Better integration for external SMS services
Expected API
Something like:
`ts
const { data, error } = await supabase.auth.admin.generateSession({
phone: "+919876543210"
})
Please add support to issue Supabase-compatible access_token and refresh_token for users authenticated by phone (SMS OTP) via the Admin API.
Use Case
In custom backend OTP flows (like verifying OTP manually from our DB), we want to programmatically issue a session token for a valid phone user without requiring the client to re-trigger Supabase's signInWithOtp.
This would allow:
• Server-side session creation for phone-authenticated users
• Avoiding duplicate OTP messages
• *Better integration for external SMS services
Expected API
Something like:
`ts
const { data, error } = await supabase.auth.admin.generateSession({
phone: "+919876543210"
})
No pledges yet. Be the first to back this.
Comments
Similar requests
Support API key generation
18 votes · 0 comments
Feature Request: Built-in Phone Number Recycling Support for Authentication
1 vote · 0 comments
Be able to store phone number without SMS provider
2 votes · 0 comments
Enhance Development Experience for Phone Authentication
2 votes · 0 comments
Ability to search for an auth user using phone number on the supabase console/studio
1 vote · 0 comments
No comments yet.