How to authenticate in Firebase by sending Otp to users via Email - javascript

Is there a way to send OTP via email using Firebase email authentication.
there are only (email + password) and (sign in with email link )available.
I'm trying to make my react native application password less authentication by using firebase
So implemented phone authentication by sending users an OTP .
There is no problem if a users wants to log in with another mobile number which was not in their current phone . They can able to see the message on another device and put in current mobile and they can able to login .
But if it comes to email they must need to signed in the email Id in their current mobile so that only they can able to redirected when they pressed the (firebase email link authentication )
So im looking for Email OTP send verification like in phone auth
if it possible to done with firebase.
*note: I can use send Grind or any other mail sending platforms to send otp and verify but how could I manage the session and tokes in it .

Related

Can I check with oauth2 if the user has a verified email on the discord account?

Can I check with oauth2 if the user has a verified email or telephone on the discord account?
I need this because I want to create a verification (ticket bot)
Please do not reply in a way that "you have this option in the server settings".
Information:
discord.js v14
javascript
node.js
I tried to search on the internet (I'm Polish so it's hard to search using the translator).
There's an email scope for Discord's OAuth2 but not a phone number scope. Here's the documentation.
If the user has a verified email, that will be sent to your application during the callback. If the email field isn't there, you can assume the user doesn't have a verified email.
I do not think there is a way to know if the user has a verified phone number or email via oAuth.
That being said, there is a setting to only allow people in the server that have a verified phone number/email.

Can you send sign-up link email with Firebase

We are using Firebase on our project and we want only users who recieved an email invitation to be able to access register page and create a profile afterwards.
Can you do that using firebase?
There is nothing built into Firebase Authentication to allow only users you've invited to sign up. When the email+password provider is enabled, anyone can call the API and register.
What you can do though is have a list of the invited email addresses in an online database somewhere (such as Firebase's Realtime Database of Firestore) and check against that list whether a user is authorized after they have signed in.
For an example of how to limit access to the database to specific users, have a look at:
for Realtime Database: How do I lock down Firebase Database to any user from a specific (email) domain?
for Firestore: Restrict Firestore gmail sign in to specific domain

Firebase Phone Authentication for new and existing users for web project

I am developing a website which directly sends unregistered and existing user credentials (such as phone number) to firebase server for SMS based phone verification. After the verification is done on the firebase server, my website records the verified phone number in local database. But this way an anonymous user is able to enter multiple phone numbers and generate multiple SMS data charges.
Is there a way to prevent data abuse
You can save the ip address of the device and limit the number of authentication attempts

Firebase Phone Auth Resend SMS

With the javascript api, is there a way to 'resend' the verifcation sms text for Firebase SMS? I can't find a solution for javascript
Whenever you call firebase.auth().signInWithPhoneNumber(phoneNumber, appVerifier), Firebase will send an SMS to verify that the user has access to that phone number.
See the Firebase guide on sending a verification code to the user's phone and the reference guide on signInWithPhoneNumber.

Firebase phone auth without code verification nor recaptcha

I am new in firebase and I am trying to integrate my WordPress authentication with firebase auth. my aim is: "when User registers on wordpress, to create a user on firebase with phoneNumber authentication for mobile app", is there a way to do firebase phone number auth through web, without Recaptcha verifier nor SMS code verification.
I created firebase account with email and password, and tried to update the User phoneNumber but without success (tried updateProfile and updatePhoneNumber)
I welcome any other idea or method for this integration (firebase/wordpress user creation)
Thank you

Categories

Resources