是否可以检查电话号码是否已在 firebase 中注册,否则请转到注册 [英] Is it possible to check phone number is already registered in firebase else goto sign up

查看:22
本文介绍了是否可以检查电话号码是否已在 firebase 中注册,否则请转到注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在生成 OTP 之前,是否要检查登录活动中输入的手机号码是否已经在 firebase 中注册?如果没有注册,我想转到注册活动.

Is there anyway to check entered mobile number in login activity is already registered with firebase before generating OTP? If not registered, I want to goto signup activity.

推荐答案

这是一个解决方案:

您可以在使用电话身份验证时编写一个 Cloud 函数并将每个电话号码添加到 Cloud Firestore,然后您可以轻松地从您的应用中调用该函数并检查它是否已注册.

You can write a Cloud function and add each phone number to Cloud Firestore while using Phone Authentication and then you can easily call the function from your app and check whether it is registered or not.

访问 https://firebase.google.com/docs/functions/callable

这篇关于是否可以检查电话号码是否已在 firebase 中注册,否则请转到注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆