microsoft-authentication-library-for-js icon indicating copy to clipboard operation
microsoft-authentication-library-for-js copied to clipboard

clientSecret can now (once again) be provided as undefined

Open Robbie-Microsoft opened this issue 1 year ago • 4 comments

Fixed a regression accidentally introduced in Implemented SHA2 Certificate Functionality. clientSecret can now (once again) be provided as undefined.

added unit test

Robbie-Microsoft avatar Jul 18 '24 16:07 Robbie-Microsoft

Hi,

I'm from #7201 and am curious about the root cause since the code has been strongly typed.

Looks like this is a runtime error and the root cause is as @RoelVB said in https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/7201#issuecomment-2232474139.

Though this PR can fix #7201, I'm afraid we may run into similar issues if it is not fixed from the root.

Related:

  • https://github.com/microsoft/TypeScript/issues/44432
  • https://github.com/microsoft/TypeScript/issues/57408

yuezk avatar Jul 19 '24 05:07 yuezk

Thanks @maorleger!

@RoelVB I agree with your analysis about what the root cause is. However, this behavior (root cause) already existed before the regression this PR addresses was introduced.

@yuezk I'm going to keep this PR as is, and create a new GitHub issue for "larger refactoring to remove the ambiguity for deeply nested properties".

Robbie-Microsoft avatar Jul 25 '24 21:07 Robbie-Microsoft

Thanks for explaining this. I agree with your decision.

yuezk avatar Jul 26 '24 01:07 yuezk