Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

React Native App: Email Address Verification Firebase

I have a React Native app running on Firebase and I wanted to make it so that when you sign up you can only use a certain custom domain email like for example "johndoe@genius.com". How can I do this?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You can do frontend regex like

const emailRegex = /^[\w-\._\+%]+@(customDomain|customDomain1)\./

and before submitting that email in api call, you can test this

const onSubmitAPi = (text) => {

if(!(emailRegex.test(text))){
return null
}

//call api here

}

Hope it helps, feel free for doubts

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading