fix issues in core
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
import type { AuthCallbackCommandDTO } from '../dto/AuthCallbackCommandDTO';
|
||||
import type { AuthSessionDTO } from '../dto/AuthSessionDTO';
|
||||
import type { AuthenticatedUserDTO } from '../dto/AuthenticatedUserDTO';
|
||||
import type { IdentityProviderPort } from '../ports/IdentityProviderPort';
|
||||
import type { IdentitySessionPort } from '../ports/IdentitySessionPort';
|
||||
import type { AuthCallbackCommand, AuthenticatedUser, IdentityProviderPort } from '../ports/IdentityProviderPort';
|
||||
import type { AuthSession, IdentitySessionPort } from '../ports/IdentitySessionPort';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import type { UseCaseOutputPort, Logger } from '@core/shared/application';
|
||||
|
||||
export type HandleAuthCallbackInput = AuthCallbackCommandDTO;
|
||||
export type HandleAuthCallbackInput = AuthCallbackCommand;
|
||||
|
||||
export type HandleAuthCallbackResult = AuthSessionDTO;
|
||||
export type HandleAuthCallbackResult = AuthSession;
|
||||
|
||||
export type HandleAuthCallbackErrorCode = 'REPOSITORY_ERROR';
|
||||
|
||||
@@ -30,7 +27,7 @@ export class HandleAuthCallbackUseCase {
|
||||
Result<void, HandleAuthCallbackApplicationError>
|
||||
> {
|
||||
try {
|
||||
const user: AuthenticatedUserDTO = await this.provider.completeAuth(input);
|
||||
const user: AuthenticatedUser = await this.provider.completeAuth(input);
|
||||
const session = await this.sessionPort.createSession(user);
|
||||
|
||||
this.output.present(session);
|
||||
|
||||
Reference in New Issue
Block a user