Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-native-test-app-msal): add support for Android #894

Merged
merged 17 commits into from Dec 7, 2021

Conversation

tido64
Copy link
Member

@tido64 tido64 commented Nov 24, 2021

Description

Adds Android support to react-native-test-app-msal.

Remaining work

Test plan

Account switcher List of accounts from MSAL Adding a new account
image image image

@github-actions github-actions bot added the chore Improvements that don't directly affect features label Nov 30, 2021

val userPrincipalName = sharedPreferences.getString(USERNAME_KEY, null)
val accountType = sharedPreferences.getString(ACCOUNT_TYPE_KEY, null)
val selectedAccount = allAccounts.find {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you have used your previously declared extension: fun List.find(userPrincipalName: String, accountType: AccountType)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's for finding com.microsoft.identity.client.IAccount instances. We have our own Account type to abstract away this detail.

+ "react-native-test-app-msal": {
+ "clientId": "00000000-0000-0000-0000-000000000000",
+ "clientId": "4b0db8c2-9f26-4417-8bde-3f0e3656f8e0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, just reusing the id from the tutorials on https://github.com/AzureAD/microsoft-authentication-library-for-android

@tido64 tido64 merged commit 1c5e36d into main Dec 7, 2021
@tido64 tido64 deleted the tido/msal-android branch December 7, 2021 12:58
@tido64 tido64 added the feature: sdk This is related to 1RN SDK label Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Improvements that don't directly affect features feature: sdk This is related to 1RN SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants