[GH-ISSUE #426] question - how do we change the name given to the token in authy? #250

Closed
opened 2026-03-03 01:27:14 +03:00 by kerem · 15 comments
Owner

Originally created by @pdarcos on GitHub (Mar 6, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/426

When I use authy with 2FA it shows the name of the account as Bitwarden.

Where is this located in the code so I can change it?

Thanks

Originally created by @pdarcos on GitHub (Mar 6, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/426 When I use authy with 2FA it shows the name of the account as Bitwarden. Where is this located in the code so I can change it? Thanks
kerem closed this issue 2026-03-03 01:27:14 +03:00
Author
Owner

@dani-garcia commented on GitHub (Mar 6, 2019):

It's hardcoded into the web vault, here. As it is we can't do much about it.

<!-- gh-comment-id:470315202 --> @dani-garcia commented on GitHub (Mar 6, 2019): It's hardcoded into the web vault, [here](https://github.com/bitwarden/web/blob/2b6ce14a32e2aadd54cc6d1800f2dec37f151d84/src/app/settings/two-factor-authenticator.component.ts#L85). As it is we can't do much about it.
Author
Owner

@pdarcos commented on GitHub (Mar 7, 2019):

Hmm, couldn't we just change that line and on the next where it states "&issuer=Bitwarden"?

Or am I forgetting something?

<!-- gh-comment-id:470531975 --> @pdarcos commented on GitHub (Mar 7, 2019): Hmm, couldn't we just change that line and on the next where it states "&issuer=Bitwarden"? Or am I forgetting something?
Author
Owner

@mprasil commented on GitHub (Mar 7, 2019):

You are forgetting, that this file is statically served, so any change there would also be static. So it would have to be build-time change.

<!-- gh-comment-id:470535762 --> @mprasil commented on GitHub (Mar 7, 2019): You are forgetting, that this file is statically served, so any change there would also be static. So it would have to be build-time change.
Author
Owner

@pdarcos commented on GitHub (Mar 7, 2019):

Got it. But if we compile the web-vault ourselves with those changes it should work, right?

<!-- gh-comment-id:470551070 --> @pdarcos commented on GitHub (Mar 7, 2019): Got it. But if we compile the web-vault ourselves with those changes it should work, right?
Author
Owner

@mprasil commented on GitHub (Mar 7, 2019):

Yes it will work.

<!-- gh-comment-id:470558675 --> @mprasil commented on GitHub (Mar 7, 2019): Yes it will work.
Author
Owner

@pdarcos commented on GitHub (Mar 7, 2019):

OK, I'm going to venture into this to see if it works.

I git cloned https://github.com/bitwarden/web.git

Then I started following your instructions here https://github.com/dani-garcia/bitwarden_rs/wiki/Building-binary

I cd into web folder and then I downloaded your v2.8.0.patch and tried to apply it as instructed in the wiki

git apply v2.8.0.patch
error: unrecognized input

I must be missing something. Any ideas?

Thanks

<!-- gh-comment-id:470586894 --> @pdarcos commented on GitHub (Mar 7, 2019): OK, I'm going to venture into this to see if it works. I git cloned https://github.com/bitwarden/web.git Then I started following your instructions here https://github.com/dani-garcia/bitwarden_rs/wiki/Building-binary I cd into web folder and then I downloaded your v2.8.0.patch and tried to apply it as instructed in the wiki git apply v2.8.0.patch error: unrecognized input I must be missing something. Any ideas? Thanks
Author
Owner

@dani-garcia commented on GitHub (Mar 7, 2019):

Hmm, no idea why that could be happening. Can you chech that the downloaded patch file has the correct encoding and end of line characters? The copy of the patches I have locally are utf8 and use linux-style line feeds.

<!-- gh-comment-id:470590659 --> @dani-garcia commented on GitHub (Mar 7, 2019): Hmm, no idea why that could be happening. Can you chech that the downloaded patch file has the correct encoding and end of line characters? The copy of the patches I have locally are utf8 and use linux-style line feeds.
Author
Owner

@mprasil commented on GitHub (Mar 7, 2019):

@pdarcos I think much easier approach would be to grab the pre-built Vault and just do your changes there.

<!-- gh-comment-id:470598168 --> @mprasil commented on GitHub (Mar 7, 2019): @pdarcos I think much easier approach would be to grab the [pre-built Vault](https://github.com/dani-garcia/bw_web_builds/releases/tag/v2.9.0-pre1) and just do your changes there.
Author
Owner

@pdarcos commented on GitHub (Mar 7, 2019):

Thanks @mprasil
I'm going to try that approach since it is indeed much easier. But if it is already pre-built will I still be able to change the strings here ?

<!-- gh-comment-id:470601402 --> @pdarcos commented on GitHub (Mar 7, 2019): Thanks @mprasil I'm going to try that approach since it is indeed much easier. But if it is already pre-built will I still be able to change the strings [here](https://github.com/bitwarden/web/blob/2b6ce14a32e2aadd54cc6d1800f2dec37f151d84/src/app/settings/two-factor-authenticator.component.ts#L85) ?
Author
Owner

@mprasil commented on GitHub (Mar 7, 2019):

I think it should still be possible. At the end of the day it's just a bunch of javascript files and the string has to be somewhere there.

<!-- gh-comment-id:470602250 --> @mprasil commented on GitHub (Mar 7, 2019): I think it should still be possible. At the end of the day it's just a bunch of javascript files and the string has to be somewhere there.
Author
Owner

@dani-garcia commented on GitHub (Mar 7, 2019):

Editing the already built vault is not the cleanest way, because the code is already minified, but for a small change like this it should be ok.

You'll need to edit the main.js file, I think. You can use search and replace for the &issuer=Bitwarden and otpauth://totp/Bitwarden: strings.

<!-- gh-comment-id:470602653 --> @dani-garcia commented on GitHub (Mar 7, 2019): Editing the already built vault is not the cleanest way, because the code is already minified, but for a small change like this it should be ok. You'll need to edit the `main.js` file, I think. You can use search and replace for the `&issuer=Bitwarden` and `otpauth://totp/Bitwarden:` strings.
Author
Owner

@pdarcos commented on GitHub (Mar 7, 2019):

Thanks guys. Found it in main.js indeed. Gonna change it and see how it works out

<!-- gh-comment-id:470604338 --> @pdarcos commented on GitHub (Mar 7, 2019): Thanks guys. Found it in main.js indeed. Gonna change it and see how it works out
Author
Owner

@pdarcos commented on GitHub (Mar 7, 2019):

To give feedback.

I ended up applying the patch (there was a typo when I copy/pasted the patch file that I fixed) and building the web-vault from scratch as per your wiki.

now it's built and working fine. The token no longer shows up as bitwarden :) Now if only I could figure out how to add an icon to the entry like cloudflare has (the original bitwarden also has no icon).

<!-- gh-comment-id:470634835 --> @pdarcos commented on GitHub (Mar 7, 2019): To give feedback. I ended up applying the patch (there was a typo when I copy/pasted the patch file that I fixed) and building the web-vault from scratch as per your wiki. now it's built and working fine. The token no longer shows up as bitwarden :) Now if only I could figure out how to add an icon to the entry like cloudflare has (the original bitwarden also has no icon).
Author
Owner

@dani-garcia commented on GitHub (Mar 7, 2019):

That depends on the OTP client, in this case Authy. If they don't let you configure it manually, it means they jsust keep an internal list of some popular options, so there isn't much you can do.

<!-- gh-comment-id:470662097 --> @dani-garcia commented on GitHub (Mar 7, 2019): That depends on the OTP client, in this case Authy. If they don't let you configure it manually, it means they jsust keep an internal list of some popular options, so there isn't much you can do.
Author
Owner

@pdarcos commented on GitHub (Mar 8, 2019):

Yeah, that makes total sense.
Thanks for the help guys.

Closing this now

<!-- gh-comment-id:471022941 --> @pdarcos commented on GitHub (Mar 8, 2019): Yeah, that makes total sense. Thanks for the help guys. Closing this now
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#250
No description provided.