mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +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": {
|
"no": {
|
||||||
"message": "No"
|
"message": "No"
|
||||||
},
|
},
|
||||||
|
"location": {
|
||||||
|
"message": "Location"
|
||||||
|
},
|
||||||
"unexpectedError": {
|
"unexpectedError": {
|
||||||
"message": "An unexpected error has occurred."
|
"message": "An unexpected error has occurred."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1009,6 +1009,9 @@
|
|||||||
"no": {
|
"no": {
|
||||||
"message": "No"
|
"message": "No"
|
||||||
},
|
},
|
||||||
|
"location": {
|
||||||
|
"message": "Location"
|
||||||
|
},
|
||||||
"overwritePassword": {
|
"overwritePassword": {
|
||||||
"message": "Overwrite password"
|
"message": "Overwrite password"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1053,6 +1053,9 @@
|
|||||||
"no": {
|
"no": {
|
||||||
"message": "No"
|
"message": "No"
|
||||||
},
|
},
|
||||||
|
"location": {
|
||||||
|
"message": "Location"
|
||||||
|
},
|
||||||
"loginOrCreateNewAccount": {
|
"loginOrCreateNewAccount": {
|
||||||
"message": "Log in or create a new account to access your secure vault."
|
"message": "Log in or create a new account to access your secure vault."
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export class PendingAuthRequestView implements View {
|
|||||||
requestDeviceIdentifier: string;
|
requestDeviceIdentifier: string;
|
||||||
requestDeviceType: string;
|
requestDeviceType: string;
|
||||||
requestIpAddress: string;
|
requestIpAddress: string;
|
||||||
|
requestCountryName: string;
|
||||||
creationDate: Date;
|
creationDate: Date;
|
||||||
|
|
||||||
static fromResponse(response: PendingOrganizationAuthRequestResponse): PendingAuthRequestView {
|
static fromResponse(response: PendingOrganizationAuthRequestResponse): PendingAuthRequestView {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export class PendingOrganizationAuthRequestResponse extends BaseResponse {
|
|||||||
requestDeviceIdentifier: string;
|
requestDeviceIdentifier: string;
|
||||||
requestDeviceType: string;
|
requestDeviceType: string;
|
||||||
requestIpAddress: string;
|
requestIpAddress: string;
|
||||||
|
requestCountryName: string;
|
||||||
creationDate: string;
|
creationDate: string;
|
||||||
|
|
||||||
constructor(response: any) {
|
constructor(response: any) {
|
||||||
@@ -21,6 +22,7 @@ export class PendingOrganizationAuthRequestResponse extends BaseResponse {
|
|||||||
this.requestDeviceIdentifier = this.getResponseProperty("RequestDeviceIdentifier");
|
this.requestDeviceIdentifier = this.getResponseProperty("RequestDeviceIdentifier");
|
||||||
this.requestDeviceType = this.getResponseProperty("RequestDeviceType");
|
this.requestDeviceType = this.getResponseProperty("RequestDeviceType");
|
||||||
this.requestIpAddress = this.getResponseProperty("RequestIpAddress");
|
this.requestIpAddress = this.getResponseProperty("RequestIpAddress");
|
||||||
|
this.requestCountryName = this.getResponseProperty("RequestCountryName");
|
||||||
this.creationDate = this.getResponseProperty("CreationDate");
|
this.creationDate = this.getResponseProperty("CreationDate");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,11 @@
|
|||||||
<p>{{ authRequestResponse?.requestDeviceType }}</p>
|
<p>{{ authRequestResponse?.requestDeviceType }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b>{{ "ipAddress" | i18n }}</b>
|
<b>{{ "location" | i18n }}</b>
|
||||||
<p>{{ authRequestResponse?.requestIpAddress }}</p>
|
<p>
|
||||||
|
<span class="tw-capitalize">{{ authRequestResponse?.requestCountryName }} </span>
|
||||||
|
({{ authRequestResponse?.requestIpAddress }})
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<b>{{ "time" | i18n }}</b>
|
<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 1 | unauthed | "Login with device" [/login] | /login-with-device | yes |
|
||||||
* | Standard Flow 2 | unauthed | "Login with device" [/login] | /login-with-device | no |
|
* | 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 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 |
|
* | 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
|
* * 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;
|
requestDeviceTypeValue: DeviceType;
|
||||||
requestDeviceIdentifier: string;
|
requestDeviceIdentifier: string;
|
||||||
requestIpAddress: string;
|
requestIpAddress: string;
|
||||||
|
requestCountryName: string;
|
||||||
key: string; // could be either an encrypted MasterKey or an encrypted UserKey
|
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)
|
masterPasswordHash: string; // if hash is present, the `key` above is an encrypted MasterKey (else `key` is an encrypted UserKey)
|
||||||
creationDate: string;
|
creationDate: string;
|
||||||
@@ -26,6 +27,7 @@ export class AuthRequestResponse extends BaseResponse {
|
|||||||
this.requestDeviceTypeValue = this.getResponseProperty("RequestDeviceTypeValue");
|
this.requestDeviceTypeValue = this.getResponseProperty("RequestDeviceTypeValue");
|
||||||
this.requestDeviceIdentifier = this.getResponseProperty("RequestDeviceIdentifier");
|
this.requestDeviceIdentifier = this.getResponseProperty("RequestDeviceIdentifier");
|
||||||
this.requestIpAddress = this.getResponseProperty("RequestIpAddress");
|
this.requestIpAddress = this.getResponseProperty("RequestIpAddress");
|
||||||
|
this.requestCountryName = this.getResponseProperty("RequestCountryName");
|
||||||
this.key = this.getResponseProperty("Key");
|
this.key = this.getResponseProperty("Key");
|
||||||
this.masterPasswordHash = this.getResponseProperty("MasterPasswordHash");
|
this.masterPasswordHash = this.getResponseProperty("MasterPasswordHash");
|
||||||
this.creationDate = this.getResponseProperty("CreationDate");
|
this.creationDate = this.getResponseProperty("CreationDate");
|
||||||
|
|||||||
Reference in New Issue
Block a user