refactor( iam ): migrate session, logout, and guards to IAM

This commit is contained in:
Abubeker Yasin
2026-06-06 08:58:42 +03:00
parent d06debf1ca
commit 023522c3fb
7 changed files with 53 additions and 190 deletions

View File

@@ -206,6 +206,12 @@ export class PassengerAuthService {
});
}
async logout(user: any, req: any) {
const iamAuthService = await this.resolveIamAuthService(req);
await iamAuthService.logout(user);
return { success: true, message: 'Logged out successfully' };
}
private async compensateIamSignup(email: string): Promise<void> {
try {
await this.dataSource.query(`DELETE FROM iam.sessions WHERE email = $1`, [email]);