-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Unable to login as admin on docker #1197
Comments
I can login to the docker env as openlibrary@example.com, pw: admin123 which is the test user |
Can you access any of the admin routes? |
Turns out no, I can't, I get an error: I obviously haven't used the admin endpoint for a while, but believed (and still do) that the user's admin access is ok because I was importing and editing with admin privs. |
Error coming from here: https://github.com/internetarchive/openlibrary/blob/master/openlibrary/templates/admin/index.html#L172
|
@mekarpeles .... and unfortunately I see the same thing in production when going to https://openlibrary.org/admin?debug=true Is this the same issue as reported, or something else? |
re. the original question, I can access pages off |
/admin fixed on openlibrary.org (but is separate issue). It moved to /stats There are other admin endpoints e.g. /admin/people which don't work for me when I login via docker or vagrant |
@mekarpeles I have tried the docker instructions from a fresh checkout of this repo and clean docker builds a+ volumes, and can log in as openlibrary@example.com and access the admin pages. |
Now that login is fixed in general, it appears to me that this is no longer an issue. I do see errors for waiting lists and imports, but I think they're unrelated: /openlibrary/openlibrary/templates/admin/waitinglists.html: error in processing template: ProgrammingError: relation "waitingloan" does not exist LINE 1: SELECT * FROM waitingloan WHERE status='available' ORDER BY ... ^ (falling back to default template) @mekarpeles can this be closed? |
I am able to successfully log in as an admin and see the following
In summary it mostly works except for two errors which look like they could be because of missing data. @mekarpeles @hornc Are you able to log in as admin now? |
For some reason when i login as any email address i end up assigned the username openlibrary1083. When i try to register a new account i get email already registered... |
Is there a way i can delete all users in database to see if user creation is associated with this problem? |
I'm hitting the same issue as @jdlrobson and we're hearing corroboration from @rohitjain00 who is also hitting this issue |
Yes, the issue is still there. |
The admin user is defined within infogami repo in The hypothesis is, use attempts to login with an email. The email and password don't match. The user |
@hornc can you please update this task w/ the cache clearing fix? |
Here are the steps to clear cookies and re-enable admin login if you get stuck with a non-admin user:
|
#1197 (comment) @charles should we add this in the FAQ too |
@tabshaikh Good idea, but I think there is a bug that needs to be fixed first -- I have added a description to clarify the action I think needs to be taken to make the fix. Hopefully that will make the workaround unnecessary, but it needs some investigation and testing. |
Closing this issue as Fix login on dev instance to fail if incorrect admin credentials |
See also: #2050 (comment) |
Multiple users have reported problems logging in as the dev admin user
openlibrary
and instead become logged in asopenlibrary7774
or some other random number appended.It looks like the cause is getting the admin123 password (an infogami default) incorrect the first time locks subsequent logins to the same non-privileged user
openlibrary{random-number}
Clearing browser cookies and logging in again with the correct password works around this issue.
Not sure why the login uses the stored user in the cookie instead of what was entered by the user logging in -- this seems like a bug and should be investigated / fixed.
ACTION: For local dev login, stop old saved cookies from overriding the currently entered username the dev is trying to login with.
The text was updated successfully, but these errors were encountered: