To implement fingerprint authentication in your mobile app using Azure, you can use Azure Active
Directory (Azure AD) along with Azure AD B2C (Business to Consumer) service. Here's a general guide
on how to achieve this:
1. Set Up Azure AD B2C:
Log in to the Azure portal (https://portal.azure.com).
Create a new Azure AD B2C tenant if you haven't already.
Configure identity providers: In this case, you'll configure a local account for your
mobile app users.
(https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-
authentication-sample-android-app?tabs=kotlin -- For The Reference)
Set up user flows: Create a user flow for sign-up/sign-in that includes fingerprint
authentication.
The sign-in flow involves the following steps:
Users open the app and select sign-in.
1. The app opens the mobile device's system browser and starts an
authentication request to Azure AD B2C.
2. Users sign up or sign in, reset the password, or sign in with a social account.
3. After users sign in successfully, Azure AD B2C returns an authorization code
to the app.
4. The app takes the following actions:
a. It exchanges the authorization code to an ID token, access token, and
refresh token.
b. It reads the ID token claims.
c. It stores the tokens in an in-memory cache for later use.
2. Integrate Azure AD B2C with your mobile app:
Configure your mobile app to use Azure AD B2C for authentication.
Use Microsoft Authentication Library (MSAL) for Android or iOS to handle
authentication in your mobile app.
3. Implement Fingerprint Authentication:
For Android:
Use Android's BiometricPrompt API to implement fingerprint authentication.
Authenticate the user using fingerprint when the user attempts to sign in.
Upon successful authentication, initiate the sign-in flow using Azure AD B2C.
For iOS:
Use Apple's BiometricKit framework to implement fingerprint
authentication.
Authenticate the user using Touch ID when the user attempts to sign in.
Upon successful authentication, initiate the sign-in flow using Azure AD B2C.
4. Handle Authentication in your Mobile App:
Once the user is authenticated via fingerprint, obtain an access token or an ID token
from Azure AD B2C.
Use the obtained token to securely access your app's backend resources or grant
access to certain features within your app.
5. Testing and Deployment:
Test the authentication flow thoroughly on different devices and scenarios to ensure
a smooth user experience.
Deploy your app to the respective app stores (Google Play Store for Android and
Apple App Store for iOS).
6. Monitoring and Maintenance:
Monitor the authentication process for any issues or errors using Azure AD B2C logs.
Keep your app updated with the latest security patches and improvements.
Ensure to follow the best practices for security and user privacy when implementing fingerprint
authentication in your mobile app. Additionally, refer to Azure AD B2C documentation and platform-
specific documentation for detailed instructions and code samples.
Resources –
Mobile apps authentication documentation:-
https://learn.microsoft.com/en-us/azure/active-directory-b2c/index-mobile
Configure authentication in a sample Android app by using Azure AD B2C:-
https://learn.microsoft.com/en-us/azure/active-directory-b2c/configure-authentication-
sample-android-app?tabs=kotlin
Enable authentication in your own Android app by using Azure AD B2C:-
https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-
android-app?tabs=kotlin
Enable authentication in your own iOS Swift app by using Azure AD B2C:-
https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-ios-
app