How to authenticate with SMS/whatsapp in MAUI App

MC App 0 Reputation points
2023-10-03T22:53:04.56+00:00

Hello everyone. I'm developing mobile app in MAUI. Everything (db, API, etc etc) is on Azure. I wonder if there's an Azure function that allow developers to authenticate user of my app through SMS or whatsapp. So I would like to

  • open app and allow user to insert his phone number
  • send this number to service that send a code through whatsapp or SMS
  • send this code to a service that give me a simple response (for example accepted for the right code or denied for the wrong code)

I searched a lot on web and on Azure documentation but I'm so confused that I need to know which service I have to use for my goal. Any idea?

Developer technologies | .NET | .NET MAUI
Microsoft Security | Microsoft Authenticator
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 78,006 Reputation points Volunteer Moderator
    2023-10-04T01:32:42.76+00:00

    your web server just needs a SMS gateway.

    • your maui app call the web service with the phone number
    • your web server generates a key and sends via sms and returns an encrypted token to the caller
    • your maui app has the user enter the ssm key value, and send it and the token to webserver
    • you websever validates the key and token and returns an authenication token to be used with api calls

    note: WhatsApp is pretty closed, the user will need to forward their sms messages to WhatsApp.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.