mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-15 02:15:14 +00:00
fix: console v2 (#1454)
* some issues * passwordless, mfa * mfa, project fixes, login policy * user table, auth service, interceptor
This commit is contained in:
@@ -37,8 +37,6 @@ export class AuthenticationService {
|
||||
|
||||
public async authenticate(
|
||||
partialConfig?: Partial<AuthConfig>,
|
||||
setState: boolean = true,
|
||||
force: boolean = false,
|
||||
): Promise<boolean> {
|
||||
if (partialConfig) {
|
||||
Object.assign(this.authConfig, partialConfig);
|
||||
@@ -50,8 +48,8 @@ export class AuthenticationService {
|
||||
|
||||
this._authenticated = this.oauthService.hasValidAccessToken();
|
||||
|
||||
if (!this.oauthService.hasValidIdToken() || !this.authenticated || partialConfig || force) {
|
||||
const newState = setState ? await this.statehandler.createState().toPromise() : undefined;
|
||||
if (!this.oauthService.hasValidIdToken() || !this.authenticated || partialConfig) {
|
||||
const newState = await this.statehandler.createState().toPromise();
|
||||
this.oauthService.initCodeFlow(newState);
|
||||
}
|
||||
this._authenticationChanged.next(this.authenticated);
|
||||
|
||||
@@ -253,6 +253,7 @@ export class GrpcAuthService {
|
||||
firstName?: string,
|
||||
lastName?: string,
|
||||
nickName?: string,
|
||||
displayName?: string,
|
||||
preferredLanguage?: string,
|
||||
gender?: Gender,
|
||||
): Promise<UpdateMyProfileResponse.AsObject> {
|
||||
@@ -266,6 +267,9 @@ export class GrpcAuthService {
|
||||
if (nickName) {
|
||||
req.setNickName(nickName);
|
||||
}
|
||||
if (displayName) {
|
||||
req.setDisplayName(displayName);
|
||||
}
|
||||
if (gender) {
|
||||
req.setGender(gender);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ export class AuthInterceptor<TReq = unknown, TResp = unknown> implements UnaryIn
|
||||
|
||||
dialogRef.afterClosed().pipe(take(1)).subscribe(resp => {
|
||||
if (resp) {
|
||||
this.authenticationService.authenticate(undefined, true, true);
|
||||
this.authenticationService.authenticate(undefined);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user