Read the SMS activation code automatically in Xamarin Forms instead of manually typing it by user

前端 未结 2 996
孤街浪徒
孤街浪徒 2021-01-03 13:27

I wrote a project with Xamarin Forms. When every user has signed up, I send him/her an activation Code to confirm it and the user has to insert it to enter the app. But I am

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-03 14:07

    If you're already sure about your clients having a SIM card in their device, then you can create a token and authenticate backwards, sending an SMS containing your token to from clients' device to your number.

    Pros:

    • No blocked numbers: Sending messages from client is not blocked even if you're on their blacklist or they're blocking advertisements and unknown senders.
    • No costs on your side for authentication.
    • This works also in iOS which you can't read but can send messages.

    Cons:

    • Client may be using another number in another device. This can be overcome by creating easy-to-type tokens which expire fast enough not to attract brute force attacks.
    • Client may not be able to send an SMS to your number due to several reasons including but not limited to not having enough account charge.

提交回复
热议问题