react-native-msal-client
v0.4.3
Published
React Native Bindings for the Microsoft MSAL library
Downloads
9
Maintainers
Readme
react-native-msal-client
This is a simple wrapper around Microsofts MSAL library. it currently only supports iOS
Requirements
- React Native (tested on 0.55)
- Cocoapods
Installation
yarn add react-native-msal-client
Install MSAL with cocoapods
Add the following to the Podfile and run ```pod install``
pod 'MSAL', '0.4.2'
Usage
import MsalClient from 'react-native-msal-client';
const authClient = MsalClient('https://login.microsoftonline.com/common')
const clientId = '1ee9299a-9936-4aa9-92c5-b5602ee938d9';
const redirectUri = `msal${clientId}://auth`;
const scopes = ['email'];
const extraQueryParms = '';
authClient.acquireTokenAsync(clientId, scopes, redirectUri, '')
.then((data)=> {
}).catch((err) => {
});