简体   繁体   English

你怎么做到这一点,你可以用应用程序的电话号码登录?

[英]How do you make it so you can sign in with phone number for app?

I am making an app and I want to know the overall jist to make it so you can sign in with your phone number. 我正在创建一个应用程序,我想知道整体的jist,以便您可以使用您的电话号码登录。 For example, in the app Down to Lunch (an app to invite your friends to get food), once you download it, the first thing you do is sign in with your phone number. 例如,在应用程序Down to Lunch(邀请您的朋友获取食物的应用程序)中,一旦您下载它,您要做的第一件事就是使用您的电话号码登录。 From then on, your number is how you are identified in the app. 从那时起,您的号码就是您在应用中识别的方式。 What I want to know is once you submit that number, is it added to a table in a database? 我想知道的是,一旦你提交了这个号码,它是否被添加到数据库中的表中? Then when a new user registers, that number must go through and check against every number in that table to make sure it is different? 然后,当新用户注册时,该号码必须通过并检查该表中的每个号码以确保它不同? If so, wouldn't that take long for a large user base (like a social network) or is that just what databases are capable of doing? 如果是这样,那么大型用户群(如社交网络)需要多长时间,或者只是数据库能够做什么? (more specifically amazon web services, because I would use their relational database service, im guessing) (更具体地说是亚马逊网络服务,因为我会使用他们的关系数据库服务,我猜)

You can use library called DIGITS and which is available on Fabric 您可以使用名为DIGITS的库,它可以在Fabric上使用

Digits lets people create an account or sign into your app using nothing but their phone number on iOS and Android. 数字可让人们创建一个帐户或使用iOS和Android上的电话号码登录您的应用程序。 Built using the same global, reliable infrastructure Twitter uses, Digits will verify the user's phone number with a simple customizable user interface that easily integrates into your app. 使用Twitter使用的相同全球可靠基础设施构建,Digits将使用简单的可自定义用户界面验证用户的电话号码,该界面可轻松集成到您的应用中。

Refer below links: 请参阅以下链接:

DIGITS - Sign in with Phone Number DIGITS - 使用电话号码登录
How to configure to app 如何配置到应用程序

Technical answer 技术答案

Facebook, Twitter and Truecaller provide free SDKs which you can include in your app to provide phone number based login into your app. Facebook,Twitter和Truecaller提供免费的SDK,您可以将其包含在您的应用中,以便为您的应用提供基于电话号码的登录。 What these SDK do is to authenticate an entered phone number (via OTP verification) and nothing more. 这些SDK的作用是验证输入的电话号码(通过OTP验证),仅此而已。 Hence you can have a phone number OTP verification gateway as soon as user start your app. 因此,只要用户启动您的应用,您就可以拥有一个电话号码OTP验证网关。 Using any one of these SDKs, you can know if the phone number verification happened successfully or not. 使用这些SDK中的任何一个,您都可以知道电话号码验证是否成功。 From here on, you have the control of the application. 从这里开始, 可以控制应用程序。 You will be handling user base. 将处理用户群。 You will keep track of user profile, friends, redundancy check (returning user check), etc. 将跟踪用户个人资料,朋友,冗余检查(返回用户检查)等。

Business answer 业务答案

For developing something humongous like a social network, you would want to segregate user ids from the start. 为了开发像社交网络一样庞大的东西,你可能希望从一开始就将用户ID分开。 You would also want to study more on computer science subjects like Data Structure. 您还希望更多地学习数据结构等计算机科学科目。 Obviously, you can never develop a perfect application. 显然,你永远无法开发出完美的应用程序。 Even if you try doing so upfront, there's a greater chance that new technologies have come up and your perfect solution isn't perfect anymore -- within 2 months. 即使你提前尝试这样做,新技术出现的可能性也会更大,而且你的完美解决方案不再是完美的 - 在2个月内。 Hence, implement a feasible solution first, which is a perfect tradeoff between perfection and time remaining for your case and your predictive growth. 因此,首先要实施一个可行的解决方案 ,这是完美和你的案例剩余时间与预测增长之间的完美权衡

Important links 重要链接

Phone number OTP verification services: 电话号码OTP验证服务:

  1. Twitter Fabric Digits: https://get.digits.com/ Twitter Fabric数字: https//get.digits.com/
  2. Facebook's OTP verification: https://developers.facebook.com/docs/accountkit Facebook的OTP验证: https//developers.facebook.com/docs/accountkit
  3. Truecaller: https://www.truecaller.com/developer Truecaller: https ://www.truecaller.com/developer

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM