Active Directory Authentication Library (ADAL) plugin provides easy to use authentication functionality for your React Native apps by taking advantage of Windows Server Active Directory and Windows Azure Active Directory.
- Support Non-Broker and Broker Based Authentication for Android and iOS
- Consistent API between Android and iOS
- Promise-based JS API
- Easy to configure and Use
- Project setup and initialization
- Usage
- Example project
- Contributing
- Contact
- TODO
- Copyright and license
See Android guide and iOS guide
import AzureAdal from 'react-native-azure-adal';
-
Configure
/** * * @param authority * @param validateAuthority * @param clientId * @param redirectUrl * @param useBroker if true, it will try to use broker based authentication only if broker is present */ configure (authority: String, validateAuthority: Boolean, clientId: String, redirectUrl: String, useBroker: Boolean)
-
Login
/** * let the user signin with azure ad credentials into your application, * if already logged in, it will not ask credentials again * @param resourceUrl * @param loginHint * @param extraQueryParameters * @returns Promise */ login (resourceUrl: String, loginHint: String, extraQueryParameters: String)
-
login With LoginPrompt
/** * Prompt the modal to let the user signin with azure ad credentials into your application * @param resourceUrl * @param loginHint * @param extraQueryParameters * @returns Promise */ loginWithPrompt (resourceUrl: String, loginHint: String, extraQueryParameters: String)
-
Get Token
/** * It will return you token * It will internally call acquireTokenSilentAsync of azure ad authentication context * Note:- One time logged in required * @param resourceUrl * @returns Promise */ getTokenAsync (resourceUrl: String)
-
Logout
/** * Sign out from your application */ logout ()
Please refer example project for more details
See the example project for a working example.
Just submit a pull request!
Drop a mail to durgaprasad.budhwani@gmail.com
- Integrate Azure AD Log
- Handle token caching in better way
- Unit Test Case
- Code Quality Integration tool - Eslint and Flow
Code released under the Apache License.