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

Add support for the upcoming user info API #893

Closed
teolemon opened this issue Mar 14, 2024 · 4 comments · Fixed by #903
Closed

Add support for the upcoming user info API #893

teolemon opened this issue Mar 14, 2024 · 4 comments · Fixed by #903
Labels

Comments

@teolemon
Copy link
Member

Description

Add support for the upcoming user info API
openfoodfacts/openfoodfacts-server#9918

@stephanegigandet
Copy link
Contributor

Note that we are planning to remove the email from the body. Is it needed for the app? cc @monsieurtanuki @g123k

@monsieurtanuki
Copy link
Contributor

Note that we are planning to remove the email from the body. Is it needed for the app? cc @monsieurtanuki @g123k

@stephanegigandet In Smoothie we don't need the user email field returned by /cgi/auth.pl:

  • we only use /cgi/auth.pl once, in off-dart's method login2
  • we only use method login2 once, in Smoothie's method getLoginResult
  • inside method getLoginResult, we only extract the user_id field

In Smoothie the user may log in with the user id or the email (same password).

Actually, from openfoodfacts/smooth-app#2464 openfoodfacts/smooth-app#3499 we explicitly use the returned user_id field instead of whatever the user typed in (user id or email) because it created side-effects to use user email.

Possible confusion: is the returned user_id always a "decent" user id - and never an email?

@stephanegigandet
Copy link
Contributor

@monsieurtanuki Perfect, thanks for checking, I will remove the email field.
The returned user_id is always the user id, never an email

@M123-dev
Copy link
Member

M123-dev commented Jun 7, 2024

Is the full endpoint documented somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

4 participants