auth icon indicating copy to clipboard operation
auth copied to clipboard

auth admin create user doesn't persist ban duration

Open castortech opened this issue 1 year ago • 0 comments

Bug report

  • [ x] I confirm this is a bug with Supabase, not with my own application.
  • [x ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When creating a user via:

const { data, error } = await supabaseAdmin.auth.admin.createUser({
		email: email,
		password: password,
		email_confirm: true,
		ban_duration: banDuration 
	})
```	
and setting a banDuration, the returned object has the correct value for banned_until but the value is not persisted in the auth.users table, which remains null.

## To Reproduce

Simply try it.

## Expected behavior

The banned_until field is populated with the correct timestamp.

castortech avatar Sep 30 '24 14:09 castortech