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

Login API inconsistencies #7076

Open
vdeantoni opened this issue Oct 12, 2022 · 2 comments
Open

Login API inconsistencies #7076

vdeantoni opened this issue Oct 12, 2022 · 2 comments
Labels
Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Priority: 3 Issues that we can consider at our leisure. [managed] Type: Bug Something isn't working. [managed]

Comments

@vdeantoni
Copy link

I've been trying to use the Login API with json, but the documentation seems out of date:

https://openlibrary.org/dev/docs/restful_api

This: To login to Open Library programatically, a POST request must be send to /account/login with username and password must be passed as a JSON dictionary. doesn't seem accurate, based on these comments:

class account_login_json(delegate.page):

I'm able to login using IA access and secret keys:

curl -i -d '{"access": "XXX", "secret": "XXX"}' -X POST https://openlibrary.org/account/login.json

but not with username/email and password:

curl -i -d '{"username": "XXX", "password": "XXX"}' -X POST https://openlibrary.org/account/login.json

Is this expected? Or am I missing something?

Also, where can I create an infogami account?

Thanks!

@vdeantoni vdeantoni added Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed] labels Oct 12, 2022
@mekarpeles mekarpeles added Priority: 2 Important, as time permits. [managed] Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] and removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Nov 14, 2022
@mekarpeles mekarpeles added Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] and removed Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] labels Sep 15, 2023
@mekarpeles mekarpeles added Priority: 3 Issues that we can consider at our leisure. [managed] and removed Priority: 2 Important, as time permits. [managed] labels Oct 18, 2023
@mekarpeles
Copy link
Member

mekarpeles commented Oct 18, 2023

I think you should be able to use email and password. The other gotcha is, I believe we use the Archive.org email (not what is in Open Library's database), so if one has updated their email on archive.org, that is the one to provide for the email field. If that is true and makes sense, we may just want to update our API docs for login and mark this issue as resolved.

@mekarpeles
Copy link
Member

See also #8210 for useful reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @jimchamp Issues overseen by Jim (Front-end Lead, BookNotes) [managed] Priority: 3 Issues that we can consider at our leisure. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

No branches or pull requests

2 participants