anonymous1184 / bitwarden-autotype

Bitwarden Auto-Type for Windows
Do What The F*ck You Want To Public License
185 stars 18 forks source link

custom vault URL #4

Closed WouterLS closed 3 years ago

WouterLS commented 3 years ago

Hi,

can this be used on a self-hosted vault with a custom URL?

anonymous1184 commented 3 years ago

Sorry for inadvertently closing the issue...

Yes, it works the same regarding of the login server. However I didn't tough of that so currently there's no option within the application.

I'll update to add this as is just a few lines of code, in the meantime (once Auto-Type is installed), you can issue the following commands in a terminal:

cd /d "%AppData%\Auto-Type"
set "BITWARDENCLI_APPDATA_DIR=%CD%"
bw logout
bw config server
bw config server https://your.self.hosted.server:1234
bw config server

The output should be something like this:

20210602105105

Indicating the default server and then your server. After that you should be able to login with both the CLI and Auto-Type.

Nanakie commented 3 years ago

It works for me via the cli when I check it but auto-type always comes up with the wrong username or password

myrandor commented 3 years ago

+1

Same here. I made the changes with the CLI. The data.json file get changed correctly.

However, when I start Auto-Type, it create a new data.json file even if a file was already there...

myrandor commented 3 years ago

Oh! Just find a fix!

After doing the "bw config server" command, you have to login using CLI and "SYNC" in order to populate the JSON correctly.

cd /d "%AppData%\Auto-Type"
set "BITWARDENCLI_APPDATA_DIR=%CD%"
bw logout
bw config server
bw config server https://your.self.hosted.server:1234
bw config server
bw login <email_address> <password>
bw sync --session <session_id provided using the last command>

After that, Auto-Type was able to login the my personal server.

anonymous1184 commented 3 years ago

The next update will include this, I uploaded the code almost a month ago https://github.com/anonymous1184/bitwarden-autotype/commit/a22cbdddd94d24c350f8291e5499aa9cc8eda435.

But I had a issue I haven't been able to reproduce, so I'm holding it... however if I cannot reproduce it again I'll will do the release.

Thanks a lot for the info on the manual fix, and as always since I started with the internet almost 30 years ago... Canadians are just awesome.

myrandor commented 3 years ago

Just had a strange issue. It seems like after a reboot or update, I had to redo the procedure again... The "server" configuration was not kept... Maybe it had something to do with the session...

KnightTim commented 3 years ago

to add one note to this issue, if you have a custom vault and click the "Open vault" right click menu option it will take you to the standard bitwarden vault page.

anonymous1184 commented 3 years ago

@KnightTim indeed, that an omission on my end. The next batch of updates is already on queue and will include this. Thanks.

Nypheena commented 3 years ago

@anonymous1184

@KnightTim indeed, that an omission on my end. The next batch of updates is already on queue and will include this. Thanks.

hows it coming along for the update?