-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Azure B2C v2 authentication via generic OIDC back-end produces "KeyError 'access_token'" on page accounts/complete/oidc #7911
Comments
Further browser debugging shows, that Weblate issued a request to Note the request query parameter |
Maybe python-social-auth/social-core#459 is related? Anyway, this is better to discuss at python-social-auth as it's not really Weblate specific issue... |
Maybe. Other enterprise apps that we are using in my company,all make the requests to endpoints under But then again: If I change the What are you suggesting? Should I open another issue in https://github.com/python-social-auth/social-core/issues or should I just comment on the linked PR? What would you guys prefer? |
If you can test the PR and provide feedback, we can probably merge it there. |
Anyway closing it here as the issue is in social auth and not in Weblate itself. |
@nijel I had a look at the code changes in the PR. They do not seem to be related to my problem. I will both open a new issue in social auth and try to test the PR. I am very eager to make make Weblate work with Azure B2C. |
Describe the issue
I am using Azure B2C for Weblate authentication via OpenID Connect. I've set the environment variable
WEBLATE_SOCIAL_AUTH_OIDC_OIDC_ENDPOINT
to the valuehttps://my-company-auth.b2clogin.com/my-company-auth.onmicrosoft.com/B2C_SIGNUP_SIGNIN/v2.0
.When I click on the Oidc button on the Weblate login page
https://weblate.mycompany.com/accounts/login/
, I am redirect to Azure B2C and I see the correct policy login page. I can also log in successfully and I am redirected tohttps://weblate.mycompany.com/accounts/complete/oidc/
.But then I see the following Django error message:
I already tried
Steps to reproduce the behavior
https://weblate.mycompany.com/accounts/login/
and click on the button "Oidc".https://weblate.mycompany.com/accounts/complete/oidc/
is loaded.Expected behavior
No Django error after login.
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
Docker container
Weblate versions
4.13.1
Weblate deploy checks
No response
Additional context
According to the error message, the problem seems to be here:
https://github.com/python-social-auth/social-core/blob/3d818d67f4969b99a09880f6a6fcf4bf187bdb28/social_core/backends/open_id_connect.py#L234
and the code expects to find the field
access_token
in the http response from the Azure B2C OIDC.If that helps, the response from
https://mycompanyauth.b2clogin.com/mycompanyauth.onmicrosoft.com/B2C_SIGNUP_SIGNIN/v2.0/.well-known/openid-configuration
looks like this:Please let me know, if I can provide any further information that might help.
The text was updated successfully, but these errors were encountered: