-
Notifications
You must be signed in to change notification settings - Fork 1
Update NativeAuth imports and added UI Automation intent based initialisation #59
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
9bb8332
293c666
82e1a6b
df1f8eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,10 +56,8 @@ class SignUpAttributesFragment : Fragment() { | |
|
|
||
| private fun submitAttributes() { | ||
| CoroutineScope(Dispatchers.Main).launch { | ||
| val username = binding.usernameText.text.toString() | ||
|
|
||
| val attributes = UserAttributes.Builder() | ||
| .flatUsername(username) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not needed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added comment to description also - Reverted changes to flatUsername to prevent building error as PR for alias is not yet merged - AzureAD/microsoft-authentication-library-for-android#2513 |
||
| .build() | ||
|
|
||
| val actionResult = currentState.submitAttributes(attributes) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,7 +72,7 @@ class SignUpCodeFragment : Fragment() { | |
| is SignUpResult.AttributesRequired -> { | ||
| // Custom implementation for Flat Username / Alias | ||
| if (actionResult.requiredAttributes.size == 1 && | ||
| actionResult.requiredAttributes.any { it.name == "flatusername" } | ||
| actionResult.requiredAttributes.any { it.attributeName == "flatusername" } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in Android Complete and pipeline it doesn't because of how it's imported |
||
| ) { | ||
| navigateToAttributes( | ||
| nextState = actionResult.nextState | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we wrap the StringUtil in our StringUtil (new) class for eliminating hard-coded values? Also, the other classes still call
StringUtil.overwriteWithNull(password).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean exactly. The only
StringUtilclass I see is in common and as @antrix1989 said we shouldn't use that. Indeed, I see now that it still existed in a few places in this sample app so I've done a commit to remove it completely. Let me know if that works or we should have a new StringUtil in MSAL or something like that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can create StringUtil in our Sample App later, to move hard-coded usages but now not important thing.