Skip to content

axzae/microsoft-authentication-library-for-android

 
 

Repository files navigation

Microsoft Authentication Library (MSAL) for Android

build github tag maven central

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:

  1. Expose RefreshToken in AuthenticationResult

Setup

Gradle

// build.gradle.kts (app module)

dependencies {
    implementation("com.axzae:msal:4.10.2")
        exclude(group = "com.microsoft.device.display")
}

Usage

object : AuthenticationCallback {
    override fun onSuccess(authenticationResult: IAuthenticationResult?) {
        authenticationResult ?: return
        
        // Access to refresh token
        viewModel.setToken(authenticationResult.refreshToken)
    }
}

See Also

About

Microsoft Authentication Library (MSAL) for Android

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Java 93.3%
  • Kotlin 6.7%