Skip to content

Conversation

@georgend
Copy link
Contributor

@georgend georgend commented Apr 13, 2021

  • Set InteractiveAuthenticationProvider as the default auth provider.
  • Inform the user of fallback to device code when Interactive Auth is unavailable due to browser not being available such as Azure CloudShell and WSL.
  • Minor cleanup, remove unused methods.
  • Add default redirect Url to PowerShell SDK App Registration. Done by @darrelmiller as detailed in MSAL Docs

Examples
Environment: Windows
PowerShell - Opens a Browser Windows/Tab
Windows PowerShell - Opens a Pop-Up Window
Environment : WSL
Falls Back to DeviceCode
image
Specifying -UseDeviceAuthentication
image

Resolves #555, #334

Inform the user of fallback to device code when Interactive Auth is unavailable due to browser not being available such as CloudShell and WSL.
Minor cleanup, remove unused methods.
@georgend georgend added the Auth label Apr 13, 2021
@georgend georgend added this to the 1.5.0 milestone Apr 13, 2021
@georgend georgend self-assigned this Apr 13, 2021
@georgend georgend requested a review from peombwa April 13, 2021 11:09
@georgend georgend linked an issue Apr 13, 2021 that may be closed by this pull request
@georgend georgend marked this pull request as ready for review April 13, 2021 11:10
@darrelmiller
Copy link
Contributor

Hey @finsharp ! It is great to see this work. I look forward to trying it out.

George and others added 3 commits April 16, 2021 17:53
Add Microsoft.WIndows.SDK.Contracts as a direct dependency, as it was transient before via MSAL 4.23
Handle case when browser may not open or other unexpected error condition.
Minor refatoring.
Co-authored-by: Peter Ombwa <peter.ombwa@microsoft.com>
@georgend
Copy link
Contributor Author

@peombwa
There are two scenarios.

  • A user may not be in an interactive session. - We detect this by the call to IsUserInteractive()
  • A User may be in an interactive session but for some reason (Browser not installed for example) the browser fails to open. - This can only be known through the exception thrown. Thus we need to fallback to DeviceCode auth in this scenario. Thats where the recursion in the catch block comes in.

@peombwa peombwa modified the milestones: 1.5.0, 1.6.0 Apr 20, 2021
georgend and others added 2 commits April 22, 2021 21:12
Store AuthProviderType in AuthContext.
Add test for fallback scenario.
@georgend georgend requested a review from peombwa April 22, 2021 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement interactive sign-in

4 participants