Skip to content
Discussion options

You must be logged in to vote

This should work but I've not done it.

You can create a trigger function on "before" for the auth.users table on insert/update. In the trigger function check the domain part of the email against the valid domain string and if not valid, return null else return new.
(New is the record passed in to the trigger function and must be returned in order for the insert/update to complete when using the before option on trigger.)
You might still want to do a user friendly check in the app signup screen, but this insures they don't get to sign in if they bypass your code.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@ananis25
Comment options

@faisalsayed10
Comment options

@faisalsayed10
Comment options

@GaryAustin1
Comment options

@faisalsayed10
Comment options

Answer selected by ananis25
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants