Skip to content

Using a trigger with a not null value in the profile table #7317

Discussion options

You must be logged in to vote

You have to pass any extra data in on signUp like this https://supabase.com/docs/reference/javascript/auth-signup#sign-up-with-additional-user-meta-data with the data object.
Then in your trigger you have to use the new.raw_user_meta_data json column to get at your role data. You can search for examples in discussions on doing that.

The bigger problem is if you are doing this from a client the user can technically put in any role he wants into the raw_user_meta_data with .update later....

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MattSolvesGames
Comment options

Answer selected by andyjamesn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants