The Microsoft Authentication Library (MSAL) for Android enables developers to acquire security tokens from the Microsoft identity platform to authenticate users and access secured web APIs for their Android based applications. The MSAL library for Android gives your app the ability to use the Microsoft Cloud by supporting Microsoft Azure Active Directory and Microsoft Personal Accounts using industry standard OAuth2 and OpenID Connect. The library also supports Azure AD B2C.
This is the enhancement version of the Microsoft's version. By using this version:
- Expose RefreshToken in
AuthenticationResult
// build.gradle.kts (app module)
dependencies {
implementation("com.axzae:msal:4.10.2")
exclude(group = "com.microsoft.device.display")
}
object : AuthenticationCallback {
override fun onSuccess(authenticationResult: IAuthenticationResult?) {
authenticationResult ?: return
// Access to refresh token
viewModel.setToken(authenticationResult.refreshToken)
}
}