Gathering detailed insights and metrics for @rnx-kit/react-native-test-app-msal
Gathering detailed insights and metrics for @rnx-kit/react-native-test-app-msal
Gathering detailed insights and metrics for @rnx-kit/react-native-test-app-msal
Gathering detailed insights and metrics for @rnx-kit/react-native-test-app-msal
Modern, scalable tools. Exceptional developer experience.
npm install @rnx-kit/react-native-test-app-msal
Typescript
Module System
Min. Node Version
Node Version
NPM Version
@rnx-kit/tsconfig@2.1.1
Updated on Jun 26, 2025
@rnx-kit/reporter@0.1.0
Updated on Jun 26, 2025
@rnx-kit/tools-filesystem@0.1.2
Updated on Jun 26, 2025
@rnx-kit/tools-workspaces@0.2.3
Updated on Jun 23, 2025
@rnx-kit/align-deps@3.0.8
Updated on Jun 23, 2025
@rnx-kit/config@0.7.4
Updated on Jun 23, 2025
TypeScript (72.72%)
JavaScript (15.89%)
Kotlin (2.19%)
MDX (2.12%)
Objective-C (1.64%)
Swift (1.34%)
Objective-C++ (1.26%)
Rust (1.17%)
CSS (0.46%)
Ruby (0.45%)
C++ (0.4%)
Shell (0.24%)
C (0.11%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1,642 Stars
3,327 Commits
105 Forks
17 Watchers
17 Branches
10,000 Contributors
Updated on Jul 15, 2025
Latest Version
5.0.2
Package Id
@rnx-kit/react-native-test-app-msal@5.0.2
Unpacked Size
81.07 kB
Size
19.26 kB
File Count
40
NPM Version
10.8.2
Node Version
20.19.1
Published on
May 16, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
Microsoft Authentication Library (MSAL) module for React Native Test App.
Add @rnx-kit/react-native-test-app-msal
as a dev dependency:
yarn add @rnx-kit/react-native-test-app-msal --dev
or if you're using npm
:
npm add --save-dev @rnx-kit/react-native-test-app-msal
We need to set the deployment target for iOS and macOS to 14.0 and 11.0 (or
higher) respectively, and add MSAL
to Podfile
:
1+platform :ios, '14.0' # If targeting iOS, discard the line below 2+platform :macos, '11.0' # If targeting macOS, discard the line above 3+ 4 require_relative '../node_modules/react-native-test-app/test_app' 5 6 workspace 'MyTestApp.xcworkspace' 7 8+use_test_app! do |target| 9+ target.app do 10+ # We must use modular headers here otherwise Swift compiler will fail 11+ pod 'MSAL', :modular_headers => true 12+ end 13+end
Add an entry for the account switcher in your app.json
, e.g.:
1 { 2 "name": "MyTestApp", 3 "displayName": "MyTestApp", 4 "components": [ 5 { 6 "appKey": "MyTestApp", 7+ }, 8+ { 9+ "appKey": "com.microsoft.reacttestapp.msal.MicrosoftAccountsActivity", 10+ "displayName": "MicrosoftAccounts (Android)" 11+ }, 12+ { 13+ "appKey": "MicrosoftAccounts", 14+ "displayName": "MicrosoftAccounts (iOS/macOS)" 15 } 16 ], 17 "resources": { 18 "android": ["dist/res", "dist/main.android.bundle"], 19 "ios": ["dist/assets", "dist/main.ios.jsbundle"], 20 "macos": ["dist/assets", "dist/main.macos.jsbundle"], 21 "windows": ["dist/assets", "dist/main.windows.bundle"] 22 } 23 }
Register your app with a unique bundle identifier to get your Azure Active
Directory client identifier and related scopes
(quickstart here),
then fill out the following fields in app.json
:
1 { 2 "name": "MyTestApp", 3 "displayName": "MyTestApp", 4 "components": [ 5 { 6 "appKey": "MyTestApp", 7 }, 8 { 9 "appKey": "com.microsoft.reacttestapp.msal.MicrosoftAccountsActivity", 10 "displayName": "MicrosoftAccounts (Android)" 11 }, 12 { 13 "appKey": "MicrosoftAccounts", 14 "displayName": "MicrosoftAccounts (iOS/macOS)" 15 } 16 ], 17+ "android": { 18+ "package": "com.contoso.MyTestApp" 19+ }, 20+ "ios": { 21+ "bundleIdentifier": "com.contoso.MyTestApp" 22+ }, 23+ "macos": { 24+ "bundleIdentifier": "com.contoso.MyTestApp" 25+ }, 26+ "react-native-test-app-msal": { 27+ "clientId": "4b0db8c2-9f26-4417-8bde-3f0e3656f8e0", 28+ "msaScopes": ["user.read"], 29+ "orgScopes": ["user.read"], 30+ "signatureHash": "1wIqXSqBj7w+h11ZifsnqwgyKrY=" 31+ }, 32 "resources": { 33 "android": ["dist/res", "dist/main.android.jsbundle"], 34 "ios": ["dist/assets", "dist/main.ios.jsbundle"], 35 "macos": ["dist/assets", "dist/main.macos.jsbundle"], 36 "windows": ["dist/assets", "dist/main.windows.bundle"] 37 } 38 }
A token can be acquired from native code using the TokenBroker
singleton.
On Android, we will need the Context
to retrieve the singleton, and the
current Activity
to acquire a token. We need the Activity
in case we need to
ask the user to log in:
1import com.microsoft.reacttestapp.msal.TokenBroker 2 3TokenBroker.getInstance(context).acquireToken(context.currentActivity, ...) { result, error -> 4 // handle result here 5}
On iOS/macOS, we will need the current UIViewController
(iOS) or
NSViewController
(macOS) to acquire a token in case we need to ask the user to
log in:
1import ReactTestApp_MSAL
2
3TokenBroker.shared.acquireToken(scopes: ..., sender: viewController) { result, error ->
4 // handle result here
5}
No vulnerabilities found.
Reason
all changesets reviewed
Reason
security policy file detected
Details
Reason
30 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
binaries present in source code
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
3 existing vulnerabilities detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More