-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
feat: API to login and get user username, name and email #7455
Conversation
Kudos, SonarCloud Quality Gate passed! |
I love the response body, as long as the Status Codes don't change and so break the older versions I really like this feature. Same goes for the other api calls. It will be a relieve if we can just foreward a consistent error to the sdk user instead of manually parsing the html and extracting errors out of it. Especially if the messages are translated. |
@stephanegigandet would you add it to the api.yml file ? |
Yes, I wanted to discuss it a bit before writing the documentation. |
What's the integration story for Ory's Hydra & Kratos? It seems like there might be some feature overlap with OIDC profile claims. |
We might take info from Ory Kratos when it's integrated, but it will take some times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Maybe, if you can, document before merging :-) (or after then)
Cool feature! Ready to implement it on off-dart when it's merged here. |
This is to address #7361 so that the Flutter app can get the username and name of an user who authenticated with an email address.
but it could also be a step to have a more uniform handling of errors in the API (specifically errors related to users not identified or bad logins and passwords supplied).
I'm proposing that we extend the /cgi/auth.pl API which currently:
The extension would be to add a JSON body:
With the proposed code, this behaviour would only apply to /cgi/auth.pl
But we could decide to extend it to all other API calls (e.g. product edit). If invalid userid / password are supplied, we return a JSON body to explain why (instead of returning an HTML content today).
I think we could keep the existing status: 0 that we have in most APIs I think (get and search product, product edit, auth), and maybe add an "error" id + and "error_message" in the language requested.
cc @VaiTon @M123-dev @monsieurtanuki @g123k