mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 01:35:54 +03:00
[GH-ISSUE #425] can't login to admin panel after update #249
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#249
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pdarcos on GitHub (Mar 6, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/425
Hi,
I'm using your latest docker image and everything works fine except logging in to the admin panel.
I'm starting bitwarden with -e ADMIN_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
But when I go to my.site/admin and am presented with the login page, even though I copy/paste the token exactly as it is above (obviously not xxxxxxxxxxxxxxxxxxxxxxxxxx) I always get the
"error: Invalid admin token, please try again." error message.
looking through the logs I see
[2019-03-06 21:17:34][rocket::rocket][INFO] POST /admin application/x-www-form-urlencoded:
[2019-03-06 21:17:34][_][INFO] Matched: POST /admin (post_admin_login)
[2019-03-06 21:17:34][bitwarden_rs::api::admin][ERROR] Invalid admin token. IP: y.y.y.y
I'm certain the token is correct since it's the same one being set on the command line. I don't understand why it thinks its invalid. Did you change anything on the admin authentication?
Thanks
@dani-garcia commented on GitHub (Mar 6, 2019):
I'm not sure why it would stop working now. Can you make sure that you aren't copying any extra characters when pasting the token? Is there any weird character that might be breaking the command line parsing or something?
@pdarcos commented on GitHub (Mar 6, 2019):
That was my first thought too but unfortunately it's not that easy.
I've even tried with -e ADMIN_TOKEN=12345678 and manually entering 12345678 in the admin panel and I still get the invalid admin token message.
Could it be ignoring -e ADMIN_TOKEN=12345678 with docker run and getting the token from somewhere else? I did migrate the bw-data folder from my previous install - maybe the previous admin token is hardcoded in there somewhere?
@dani-garcia commented on GitHub (Mar 6, 2019):
If you ever edited the config options in the admin panel, then that should have saved the settings to bw-data/config.json, and that file overrides the environment variables, so it might be using an old value, yes.
@pdarcos commented on GitHub (Mar 6, 2019):
Aha, that was it.
Thanks!