mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:17:32 +00:00
merge main into next
This commit is contained in:
@@ -157,7 +157,7 @@ export class AuthUserMfaComponent implements OnInit, OnDestroy {
|
||||
this.service
|
||||
.removeMyAuthFactorOTPEmail()
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.U2FREMOVED', true);
|
||||
this.toast.showInfo('USER.TOAST.OTPREMOVED', true);
|
||||
|
||||
this.cleanupList();
|
||||
this.getMFAs();
|
||||
@@ -169,7 +169,7 @@ export class AuthUserMfaComponent implements OnInit, OnDestroy {
|
||||
this.service
|
||||
.removeMyAuthFactorOTPSMS()
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.U2FREMOVED', true);
|
||||
this.toast.showInfo('USER.TOAST.OTPREMOVED', true);
|
||||
|
||||
this.cleanupList();
|
||||
this.getMFAs();
|
||||
|
@@ -102,6 +102,36 @@ export class UserMfaComponent implements OnInit, OnDestroy {
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
} else if (factor.otpEmail) {
|
||||
this.mgmtUserService
|
||||
.removeHumanAuthFactorOTPEmail(this.user.id)
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.OTPREMOVED', true);
|
||||
|
||||
const index = this.dataSource.data.findIndex((mfa) => !!mfa.otpEmail);
|
||||
if (index > -1) {
|
||||
this.dataSource.data.splice(index, 1);
|
||||
}
|
||||
this.getMFAs();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
} else if (factor.otpSms) {
|
||||
this.mgmtUserService
|
||||
.removeHumanAuthFactorOTPSMS(this.user.id)
|
||||
.then(() => {
|
||||
this.toast.showInfo('USER.TOAST.OTPREMOVED', true);
|
||||
|
||||
const index = this.dataSource.data.findIndex((mfa) => !!mfa.otpSms);
|
||||
if (index > -1) {
|
||||
this.dataSource.data.splice(index, 1);
|
||||
}
|
||||
this.getMFAs();
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@@ -322,8 +322,12 @@ import {
|
||||
RemoveCustomLabelPolicyLogoDarkResponse,
|
||||
RemoveCustomLabelPolicyLogoRequest,
|
||||
RemoveCustomLabelPolicyLogoResponse,
|
||||
RemoveHumanAuthFactorOTPEmailRequest,
|
||||
RemoveHumanAuthFactorOTPEmailResponse,
|
||||
RemoveHumanAuthFactorOTPRequest,
|
||||
RemoveHumanAuthFactorOTPResponse,
|
||||
RemoveHumanAuthFactorOTPSMSRequest,
|
||||
RemoveHumanAuthFactorOTPSMSResponse,
|
||||
RemoveHumanAuthFactorU2FRequest,
|
||||
RemoveHumanAuthFactorU2FResponse,
|
||||
RemoveHumanLinkedIDPRequest,
|
||||
@@ -1805,6 +1809,18 @@ export class ManagementService {
|
||||
return this.grpcService.mgmt.removeHumanAuthFactorU2F(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public removeHumanAuthFactorOTPSMS(userId: string): Promise<RemoveHumanAuthFactorOTPSMSResponse.AsObject> {
|
||||
const req = new RemoveHumanAuthFactorOTPSMSRequest();
|
||||
req.setUserId(userId);
|
||||
return this.grpcService.mgmt.removeHumanAuthFactorOTPSMS(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public removeHumanAuthFactorOTPEmail(userId: string): Promise<RemoveHumanAuthFactorOTPEmailResponse.AsObject> {
|
||||
const req = new RemoveHumanAuthFactorOTPEmailRequest();
|
||||
req.setUserId(userId);
|
||||
return this.grpcService.mgmt.removeHumanAuthFactorOTPEmail(req, null).then((resp) => resp.toObject());
|
||||
}
|
||||
|
||||
public updateHumanProfile(
|
||||
userId: string,
|
||||
firstName?: string,
|
||||
|
Reference in New Issue
Block a user