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

Open
teolemon opened this issue Mar 14, 2024 · 3 comments · May be fixed by #903
Open

Add support for the upcoming user info API #893

teolemon opened this issue Mar 14, 2024 · 3 comments · May be 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

@monsieurtanuki monsieurtanuki self-assigned this Mar 19, 2024
@monsieurtanuki monsieurtanuki linked a pull request Apr 9, 2024 that will close this issue
@monsieurtanuki monsieurtanuki removed their assignment Apr 22, 2024
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.

3 participants