feat(console): add otp sms and otp email as factor (#6343)

* cli, core

* material cdk

* schematics

* chore(deps-dev): bump eslint from 8.40.0 to 8.44.0 in /console (#6127)

Bumps [eslint](https://github.com/eslint/eslint) from 8.40.0 to 8.44.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.40.0...v8.44.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* npm

* feat: add otp sms button

* lock

* rm package-lock

* prompt to setup sms otp on verify

* cli, core

* material, cdk

* schematics

* otp email

* show type

* show type on mgmt page

* disable selection on add

* rename totp

* fix totp i18n

* directly use data, fix styles

* sms req

* fix type check

* fix delete

* rm comment

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Max Peintner
2023-08-16 06:37:16 +02:00
committed by GitHub
parent 26b28ed2af
commit a262595fc2
31 changed files with 3641 additions and 2547 deletions

View File

@@ -16,8 +16,12 @@ import {
} from 'rxjs/operators';
import {
AddMyAuthFactorOTPEmailRequest,
AddMyAuthFactorOTPEmailResponse,
AddMyAuthFactorOTPRequest,
AddMyAuthFactorOTPResponse,
AddMyAuthFactorOTPSMSRequest,
AddMyAuthFactorOTPSMSResponse,
AddMyAuthFactorU2FRequest,
AddMyAuthFactorU2FResponse,
AddMyPasswordlessLinkRequest,
@@ -61,8 +65,12 @@ import {
ListMyUserSessionsResponse,
ListMyZitadelPermissionsRequest,
ListMyZitadelPermissionsResponse,
RemoveMyAuthFactorOTPEmailRequest,
RemoveMyAuthFactorOTPEmailResponse,
RemoveMyAuthFactorOTPRequest,
RemoveMyAuthFactorOTPResponse,
RemoveMyAuthFactorOTPSMSRequest,
RemoveMyAuthFactorOTPSMSResponse,
RemoveMyAuthFactorU2FRequest,
RemoveMyAuthFactorU2FResponse,
RemoveMyAvatarRequest,
@@ -557,6 +565,18 @@ export class GrpcAuthService {
return this.grpcService.auth.addMyAuthFactorOTP(new AddMyAuthFactorOTPRequest(), null).then((resp) => resp.toObject());
}
public addMyAuthFactorOTPSMS(): Promise<AddMyAuthFactorOTPSMSResponse.AsObject> {
return this.grpcService.auth
.addMyAuthFactorOTPSMS(new AddMyAuthFactorOTPSMSRequest(), null)
.then((resp) => resp.toObject());
}
public addMyAuthFactorOTPEmail(): Promise<AddMyAuthFactorOTPEmailResponse.AsObject> {
return this.grpcService.auth
.addMyAuthFactorOTPEmail(new AddMyAuthFactorOTPEmailRequest(), null)
.then((resp) => resp.toObject());
}
public addMyMultiFactorU2F(): Promise<AddMyAuthFactorU2FResponse.AsObject> {
return this.grpcService.auth.addMyAuthFactorU2F(new AddMyAuthFactorU2FRequest(), null).then((resp) => resp.toObject());
}
@@ -617,6 +637,18 @@ export class GrpcAuthService {
.then((resp) => resp.toObject());
}
public removeMyAuthFactorOTPSMS(): Promise<RemoveMyAuthFactorOTPSMSResponse.AsObject> {
return this.grpcService.auth
.removeMyAuthFactorOTPSMS(new RemoveMyAuthFactorOTPSMSRequest(), null)
.then((resp) => resp.toObject());
}
public removeMyAuthFactorOTPEmail(): Promise<RemoveMyAuthFactorOTPEmailResponse.AsObject> {
return this.grpcService.auth
.removeMyAuthFactorOTPEmail(new RemoveMyAuthFactorOTPEmailRequest(), null)
.then((resp) => resp.toObject());
}
public verifyMyMultiFactorOTP(code: string): Promise<VerifyMyAuthFactorOTPResponse.AsObject> {
const req = new VerifyMyAuthFactorOTPRequest();
req.setCode(code);