Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: authentication with email works #1438

Merged
merged 1 commit into from Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/vre/shared/app-session/src/lib/auth.service.ts
Expand Up @@ -59,7 +59,7 @@ export class AuthService {
}
return throwError(error);
}),
switchMap(() => this.store.dispatch(new LoadUserAction(identifier)))
switchMap(() => this.store.dispatch(new LoadUserAction(identifier, identifierType)))
);
}

Expand Down
9 changes: 8 additions & 1 deletion libs/vre/shared/app-state/src/lib/user/user.actions.ts
Expand Up @@ -2,24 +2,28 @@ import { ReadUser, User } from '@dasch-swiss/dsp-js';

export class LoadUserAction {
static readonly type = '[User] Load User';

constructor(
public identifier: string,
public idType: 'iri' | 'username' = 'username'
public idType: 'iri' | 'username' | 'email' = 'username'
) {}
}

export class LoadUserContentByIriAction {
static readonly type = '[User] Load User Content By Iri';

constructor(public iri: string) {}
}

export class SetUserAction {
static readonly type = '[User] Set User';

constructor(public user: ReadUser) {}
}

export class RemoveUserAction {
static readonly type = '[User] Remove User';

constructor(public user: ReadUser) {}
}

Expand All @@ -29,11 +33,13 @@ export class LogUserOutAction {

export class SetUserProjectGroupsAction {
static readonly type = '[User] Set User Project Groups';

constructor(public user: ReadUser) {}
}

export class LoadUsersAction {
static readonly type = '[User] Load All Users';

constructor(public loadFullUserData = false) {}
}

Expand All @@ -43,5 +49,6 @@ export class ResetUsersAction {

export class CreateUserAction {
static readonly type = '[User] Create User';

constructor(public userData: User) {}
}