Re-introducing the changes to use localhost in the redirect URL for LWA authentication, rather than 127.0.0.1.
The changes were initially introduced here and reverted here.
Motivation and Context
This allows the redirect to go through successfully for WSL users.
For context, these changes were introduced in version 2.11.2 of the extension but were backed out, as it caused an issue for new profiles when attempting to authenticate. The redirect URL whitelist in the existing security profile was not configured to allow for localhost:9090. We have since updated the configuration and can move ahead with this change (testing details below).
Testing
Downgraded extension to 2.11.2, where the changes (and localhost redirect failure) were first introduced:
Created a new profile:
Signed in to the LWA portal, redirect URL is now showing localhost and is successful:
We are also getting the success response in VSCode:
Unit tests successful:
Screenshots (if appropriate)
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[x] My code follows the code style of this project
[ ] My change requires a change to the documentation
Use localhost instead 127.0.0.1 for WSL support
Description
Re-introducing the changes to use localhost in the redirect URL for LWA authentication, rather than 127.0.0.1.
The changes were initially introduced here and reverted here.
Motivation and Context
This allows the redirect to go through successfully for WSL users.
For context, these changes were introduced in version 2.11.2 of the extension but were backed out, as it caused an issue for new profiles when attempting to authenticate. The redirect URL whitelist in the existing security profile was not configured to allow for localhost:9090. We have since updated the configuration and can move ahead with this change (testing details below).
Testing
Downgraded extension to 2.11.2, where the changes (and localhost redirect failure) were first introduced:![image](https://user-images.githubusercontent.com/56455637/181349152-adcc3d55-d05c-4b53-8a4b-a5f1e73ab186.png)
Created a new profile:![image](https://user-images.githubusercontent.com/56455637/181344516-38fa9f6b-e7a6-4541-a852-f5d5aee97425.png)
Signed in to the LWA portal, redirect URL is now showing localhost and is successful:
![image](https://user-images.githubusercontent.com/56455637/181348703-8a909d4b-6df3-4d0b-8a11-a3c3083439e8.png)
We are also getting the success response in VSCode:![image](https://user-images.githubusercontent.com/56455637/181348757-e069a16b-8a56-4ee3-88f5-ad0fb442d68f.png)
Unit tests successful:![image](https://user-images.githubusercontent.com/56455637/181349023-35c9f0f8-8034-4ad4-8588-bc7f0ccd3d4a.png)
Screenshots (if appropriate)
Types of changes
Checklist
License