-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[🐛 Bug]: User.Identity.IsAuthenticated and User.Identity.Name not working anymore since webDriver version 4.12 #12692
Comments
@fangwangse, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
@fangwangse please try to use the latest 4.12.4 and report results back. @jimevans I think it's related to |
I've tried 4.12.4 already, same problem as 4.12.0 |
Please help us: uninstall Selenium.WebDriver package and share the list of your packages (with versions) in the project. Thank you. |
Uninstalling the selenium.webdriver does't help either.
and some EntityFrameworkCore (6.0.4) related packages. |
Stop. You uninstalled |
Yes, because this package is still installed: It works Only when I remove both Selenium.WebDriver and Selenium.Support |
Gotcha. Can we please compare a list of your And what is your .net target framework? |
It’s .net6 |
There is only 1 diff between 4.11 and 4.12 - selenium became honest and declared dependencies:
I created couple of PRs to remove these dependencies entirely, so installing Selenium packages should not affect your project. Stay tuned. |
Sorry the version info for the 3 packages (see below) that I posted previously is wrong, the version info that I’m using is actually:
I do see your PR of moving the dependency of Microsoft.IdentityModel.Tokens, hopefully this will solve the issue. I’m looking forward to the new release 😊 |
@fangwangse please check, 4.13.1 is out. |
Let us know if there's still a problem. |
Yay! 4.13.1 works, thanks for all your great work! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
I have OIDC authentication enabled in my API. When user gets authenticated via the swagger UI (or web client), I get correct values for
_httpContextAccessor.HttpContext.User.Identity.Name
_httpContextAccessor.HttpContext.User.Identity.IsAuthenticated (=True)
in my services.
When I add the following packages:
It still works fine.
But, if I upgrade above packages to the latest version 4.12.x, i.e.:
_httpContextAccessor.HttpContext.User.Identity.Name
_httpContextAccessor.HttpContext.User.Identity.IsAuthenticated
stop returning correct values:
...Identity.Name is always null, ...Identity.IsAuthenticated is always False.
If I remove these 2 packages, or downgraded back to 4.11.0, correct values are back as well.
How can we reproduce the issue?
Relevant log output
Without installing package "Selenium.WebDriver" , or with version 4.11: _httpContextAccessor.HttpContext.User.Identity.Name has correct value, _httpContextAccessor.HttpContext.User.Identity.IsAuthenticated is True, when user authenticated or logged in. With 4.12: _httpContextAccessor.HttpContext.User.Identity.Name is null, _httpContextAccessor.HttpContext.User.Identity.IsAuthenticated is always False, even though the user is authenticated
Operating System
Windows 10
Selenium version
dotnet, 4.12.x
What are the browser(s) and version(s) where you see this issue?
Chrome, Edge
What are the browser driver(s) and version(s) where you see this issue?
Selenium.WebDriver 4.12.x
Are you using Selenium Grid?
N/A
The text was updated successfully, but these errors were encountered: