2
There should be an idempotent equivalent of `createUser`
Source: supabase/supabase#16720 · opened by @icopp
For example, this could be a method like auth.admin.ensureUser that
• takes the same arguments as createUser
• returns a matching user if there is a single matching user
• updates the matching user to include additional params if there's a single matching user (e.g. add email or phone number if they don't correspond to any other users)
• returns an error if there's more than one matching user (such as email and phone corresponding to separate users)
This would make life much easier for those of us who have to deal with programmatically created users, since it would allow replacing current slower and more complicated code with a single call.
• takes the same arguments as createUser
• returns a matching user if there is a single matching user
• updates the matching user to include additional params if there's a single matching user (e.g. add email or phone number if they don't correspond to any other users)
• returns an error if there's more than one matching user (such as email and phone corresponding to separate users)
This would make life much easier for those of us who have to deal with programmatically created users, since it would allow replacing current slower and more complicated code with a single call.
No pledges yet. Be the first to back this.
Comments
Similar requests
Support For PUT in pg_net
1 vote · 0 comments
Add schema-aware Functions, Args, and Returns helper types to generated Supabase TypeScript types
1 vote · 0 comments
Bulk User Create / Upsert with Email Confirmed Option
3 votes · 0 comments
GoTrue: Allow to send confirmation emails when creating users through admin API
5 votes · 0 comments
Support skipping conflicting rows during CSV import
1 vote · 0 comments
No comments yet.