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
Clean up native auth msal logging #2071
base: dev
Are you sure you want to change the base?
Conversation
…Leave it to the ticket on Exception wrapper.
1. Only log unexpected error using Logger. 2. User LogSession in Kotlin coroutines variant for every interface method.
msal/src/main/java/com/microsoft/identity/nativeauth/NativeAuthPublicClientApplication.kt
Show resolved
Hide resolved
@@ -372,11 +373,6 @@ class NativeAuthPublicClientApplication( | |||
} | |||
} | |||
is SignInCommandResult.CodeRequired -> { | |||
Logger.warn( |
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 have this log here on purpose, please leave it in (notice how it's a warning and not an info). This is to deal with the scenario where a developer calls signIn(username, password) with an account that's an email + OTP signup. The password is silently ignored; this log tries to warn developers of that. Perhaps not the best solution, but best to leave it in for now.
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.
Sure. The reason is strong here.
msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/AccountState.kt
Show resolved
Hide resolved
@@ -410,11 +395,6 @@ class ResetPasswordPasswordRequiredState internal constructor( | |||
} | |||
|
|||
is ResetPasswordCommandResult.UserNotFound -> { | |||
Logger.warn( |
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.
re. https://github.com/AzureAD/microsoft-authentication-library-common-for-android/pull/2374/files#r1555927999 - if we add in some form of CommandResult logging, then I agree we can remove this log here. But I would like to have a way of seeing what the CommandResult was that the internal SDK business logic produced, so that we for example can determine that it was an "unexpected result" in the SDK interface and why we're returning an Error to the developer. Wdyt?
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.
CommandResult has been put back in that PR.
…ry since it will provide us SDK process info
…allback and coroutines
This reverts commit c448b88.
This reverts commit d7d9032.
# Conflicts: # msal/src/main/java/com/microsoft/identity/nativeauth/NativeAuthPublicClientApplication.kt # msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/ResetPasswordStates.kt # msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/SignUpStates.kt
# Conflicts: # msal/src/main/java/com/microsoft/identity/nativeauth/NativeAuthPublicClientApplication.kt # msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/AccountState.kt # msal/src/main/java/com/microsoft/identity/nativeauth/statemachine/states/SignInStates.kt
Goal:
Changes summary:
Company PR:
AzureAD/microsoft-authentication-library-common-for-android#2396