mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-15015] Adding Request Country Name to auth requests approval dialog (#13718)
* feat(pm-15015) : - Adding `requestCountryName` to auth requests dialogs, and response models. - Updated i18n messages.json in Web, Browser, and Desktop to include "Location" translation.
This commit is contained in:
@@ -901,6 +901,9 @@
|
||||
"no": {
|
||||
"message": "No"
|
||||
},
|
||||
"location": {
|
||||
"message": "Location"
|
||||
},
|
||||
"unexpectedError": {
|
||||
"message": "An unexpected error has occurred."
|
||||
},
|
||||
|
||||
@@ -878,7 +878,7 @@
|
||||
},
|
||||
"useYourRecoveryCode": {
|
||||
"message": "Use your recovery code"
|
||||
},
|
||||
},
|
||||
"insertYubiKey": {
|
||||
"message": "Insert your YubiKey into your computer's USB port, then touch its button."
|
||||
},
|
||||
@@ -1009,6 +1009,9 @@
|
||||
"no": {
|
||||
"message": "No"
|
||||
},
|
||||
"location": {
|
||||
"message": "Location"
|
||||
},
|
||||
"overwritePassword": {
|
||||
"message": "Overwrite password"
|
||||
},
|
||||
|
||||
@@ -1053,6 +1053,9 @@
|
||||
"no": {
|
||||
"message": "No"
|
||||
},
|
||||
"location": {
|
||||
"message": "Location"
|
||||
},
|
||||
"loginOrCreateNewAccount": {
|
||||
"message": "Log in or create a new account to access your secure vault."
|
||||
},
|
||||
|
||||
@@ -13,6 +13,7 @@ export class PendingAuthRequestView implements View {
|
||||
requestDeviceIdentifier: string;
|
||||
requestDeviceType: string;
|
||||
requestIpAddress: string;
|
||||
requestCountryName: string;
|
||||
creationDate: Date;
|
||||
|
||||
static fromResponse(response: PendingOrganizationAuthRequestResponse): PendingAuthRequestView {
|
||||
|
||||
@@ -9,6 +9,7 @@ export class PendingOrganizationAuthRequestResponse extends BaseResponse {
|
||||
requestDeviceIdentifier: string;
|
||||
requestDeviceType: string;
|
||||
requestIpAddress: string;
|
||||
requestCountryName: string;
|
||||
creationDate: string;
|
||||
|
||||
constructor(response: any) {
|
||||
@@ -21,6 +22,7 @@ export class PendingOrganizationAuthRequestResponse extends BaseResponse {
|
||||
this.requestDeviceIdentifier = this.getResponseProperty("RequestDeviceIdentifier");
|
||||
this.requestDeviceType = this.getResponseProperty("RequestDeviceType");
|
||||
this.requestIpAddress = this.getResponseProperty("RequestIpAddress");
|
||||
this.requestCountryName = this.getResponseProperty("RequestCountryName");
|
||||
this.creationDate = this.getResponseProperty("CreationDate");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,11 @@
|
||||
<p>{{ authRequestResponse?.requestDeviceType }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<b>{{ "ipAddress" | i18n }}</b>
|
||||
<p>{{ authRequestResponse?.requestIpAddress }}</p>
|
||||
<b>{{ "location" | i18n }}</b>
|
||||
<p>
|
||||
<span class="tw-capitalize">{{ authRequestResponse?.requestCountryName }} </span>
|
||||
({{ authRequestResponse?.requestIpAddress }})
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<b>{{ "time" | i18n }}</b>
|
||||
|
||||
@@ -382,7 +382,7 @@ export class LoginViaAuthRequestComponent implements OnInit, OnDestroy {
|
||||
* | Standard Flow 1 | unauthed | "Login with device" [/login] | /login-with-device | yes |
|
||||
* | Standard Flow 2 | unauthed | "Login with device" [/login] | /login-with-device | no |
|
||||
* | Standard Flow 3 | authed | "Approve from your other device" [/login-initiated] | /login-with-device | yes |
|
||||
* | Standard Flow 4 | authed | "Approve from your other device" [/login-initiated] | /login-with-device | no | |
|
||||
* | Standard Flow 4 | authed | "Approve from your other device" [/login-initiated] | /login-with-device | no |
|
||||
* | Admin Flow | authed | "Request admin approval" [/login-initiated] | /admin-approval-requested | NA - admin requests always send encrypted userKey |
|
||||
* |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
* * Note 1: The phrase "in memory" here is important. It is possible for a user to have a master password for their account, but not have a masterKey IN MEMORY for
|
||||
|
||||
@@ -10,6 +10,7 @@ export class AuthRequestResponse extends BaseResponse {
|
||||
requestDeviceTypeValue: DeviceType;
|
||||
requestDeviceIdentifier: string;
|
||||
requestIpAddress: string;
|
||||
requestCountryName: string;
|
||||
key: string; // could be either an encrypted MasterKey or an encrypted UserKey
|
||||
masterPasswordHash: string; // if hash is present, the `key` above is an encrypted MasterKey (else `key` is an encrypted UserKey)
|
||||
creationDate: string;
|
||||
@@ -26,6 +27,7 @@ export class AuthRequestResponse extends BaseResponse {
|
||||
this.requestDeviceTypeValue = this.getResponseProperty("RequestDeviceTypeValue");
|
||||
this.requestDeviceIdentifier = this.getResponseProperty("RequestDeviceIdentifier");
|
||||
this.requestIpAddress = this.getResponseProperty("RequestIpAddress");
|
||||
this.requestCountryName = this.getResponseProperty("RequestCountryName");
|
||||
this.key = this.getResponseProperty("Key");
|
||||
this.masterPasswordHash = this.getResponseProperty("MasterPasswordHash");
|
||||
this.creationDate = this.getResponseProperty("CreationDate");
|
||||
|
||||
Reference in New Issue
Block a user