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

[14.0] auth_oidc with authorization flow should call validation endpoint #325

Open
stellamargonar opened this issue Jan 12, 2022 · 3 comments
Labels
enhancement no stale Use this label to prevent the automated stale action from closing this PR/Issue.

Comments

@stellamargonar
Copy link

Module auth_oidc, Odoo 14.0
I have a OpenID provider configured in Odoo after installing the auth_oidc addon from this repository. Currently i'm working on Odoo 14, using #261 and the provider is using OpenID Connect (authorisation code flow)

It works, meaning that users can now login in Odoo with the OpenID provider, and the first time the user is created with the default template.
The problem is that the only information that Odoo reads from the provider are the ones in the token, which is only the user id. Even though i configured all the endpoints (authentication, validation, token, jwks and data) the addon is not calling the validation and data (they are the same anyway) endpoint: this api would return all the user claims the client has access to, including email, that would be necessary to properly configure the user in Odoo.

Accordingly to the OpenID protocol seems like after the authorisation phase, the client should also send a request to the userinfo endpoint, but this is not implemented in auth_oidc.

On the other side, i see that this particular call was present in the auth_oauth addon.

I would suggest to add to the implementation of addons.auth_oidc.models.res_users.ResUsers.auth_oauth a call to the validation endpoint (if provided) similarly to what is done in auth_oauth addon, and update the validation dictionary with the result of the call.

@sbidoul
Copy link
Member

sbidoul commented Jan 17, 2022

Sounds reasonable. Would you like to do a PR ?

@stellamargonar
Copy link
Author

Sure, here it is #336

@github-actions
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 24, 2022
@sbidoul sbidoul added no stale Use this label to prevent the automated stale action from closing this PR/Issue. and removed stale PR/Issue without recent activity, it'll be soon closed automatically. labels Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement no stale Use this label to prevent the automated stale action from closing this PR/Issue.
Projects
None yet
Development

No branches or pull requests

2 participants