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

PowerShell Core Sign-in, Wait for Multi-Factor dies while waiting #417

Open
Eric2XU opened this issue Jul 13, 2022 · 4 comments
Open

PowerShell Core Sign-in, Wait for Multi-Factor dies while waiting #417

Eric2XU opened this issue Jul 13, 2022 · 4 comments

Comments

@Eric2XU
Copy link

Eric2XU commented Jul 13, 2022

Error: Submit-RstsMultiFactorCredential: Exception calling "FlushInputBuffer" with "0" argument(s): "Stream does not support writing."

Verbose logging:

VERBOSE: Configuring SSL version support to be secure
VERBOSE: Disabling SSL on non-Windows platform
VERBOSE: Adding the trust everything callback
VERBOSE: Getting configured identity providers from RSTS service (using POST)...
VERBOSE: POST with 11-byte payload
VERBOSE: received 974-byte response of content type application/json
VERBOSE: Content encoding: utf-8
Username:
Password: ******************
VERBOSE: POST with 0-byte payload
VERBOSE: received 974-byte response of content type application/json
VERBOSE: Content encoding: utf-8
VERBOSE: POST with 129-byte payload
VERBOSE: received 147-byte response of content type application/json
VERBOSE: Content encoding: utf-8
VERBOSE: Importing function 'Add-ExWebClientExType'.
VERBOSE: Importing function 'Get-CertificateFileContents'.
VERBOSE: Importing function 'Get-Confirmation'.
VERBOSE: Importing function 'Get-Tool'.
VERBOSE: Importing function 'Show-SshHostKeyPrompt'.
VERBOSE: Importing function 'Test-IpAddress'.
VERBOSE: Importing function 'Use-CertificateFile'.
VERBOSE: POST with 129-byte payload
VERBOSE: received 285-byte response of content type application/json
VERBOSE: Content encoding: utf-8
You will receive a push notification in your Starling Two-Factor Authentication app. Approve the request with ID 8GTX to complete the login.
VERBOSE: POST with 305-byte payload
VERBOSE: received 285-byte response of content type application/json
VERBOSE: Content encoding: utf-8
You will receive a push notification in your Starling Two-Factor Authentication app. Approve the request with ID 8GTX to complete the login.
Press any key to use OTP instead... VERBOSE: Enabling SSL on non-Windows platform
VERBOSE: Removing the trust everything callback
Submit-RstsMultiFactorCredential: Exception calling "FlushInputBuffer" with "0" argument(s): "Stream does not support writing."

The better option is to add the -gui flag for core since ux is now part of .net core but ill take -twofactor if it works, it does work on other platforms but on my Mac it bombs and its so annoying to have to manually pull my creds every few hours.

Running on OSX 12.4 (although this happened on earlier versions too) using PowerShell 7.2.5 (although happened on earlier versions as well) using safeguard-ps module version: 6.13.62645 (although happened on earlier version too).

@Eric2XU
Copy link
Author

Eric2XU commented Jul 13, 2022

Oh worth mentioning I do get the MFA prompt on my phone but it bombs out before I can respond.

@petrsnd
Copy link
Member

petrsnd commented Jul 25, 2022

@Eric2XU Did you try the new -Browser option? That was added specifically for you based on #346. :)

Maybe I didn't do a good job publishing that to you.

@petrsnd
Copy link
Member

petrsnd commented Jul 25, 2022

See #360

@Eric2XU
Copy link
Author

Eric2XU commented Jul 26, 2022

Oh super cool! I am not sure I was aware of this or not. Its possible this came across to me but I thought it was the -gui flag. I can confirm that -browser works on Mac so im happy. I do think there is a bug in the code related to : Submit-RstsMultiFactorCredential but I guess thats up to you if you want to fix it. I am thrilled with the -browser flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants