fix: refresh access token expiry 60m (#14331)

* fix: refresh access token expiry 60m

* fix: exception filters logging request

* fix: never auto accept domain for managed users
This commit is contained in:
Morgan authored and GitHub committed 2024-04-04 09:07:43 -03:00
1 parent a8d8c992a4
commit a72a3e45e9
8 files changed
+35 -17

No files matched your search

@@ -1,16 +1,16 @@
import { BaseStrategy } from "@/lib/passport/strategies/types";
import { NextAuthPassportStrategy } from "@/lib/passport/strategies/types";
import { UsersRepository } from "@/modules/users/users.repository";
import { Injectable } from "@nestjs/common";
import { PassportStrategy } from "@nestjs/passport";
@Injectable()
export class NextAuthMockStrategy extends PassportStrategy(BaseStrategy, "next-auth") {
export class NextAuthMockStrategy extends PassportStrategy(NextAuthPassportStrategy, "next-auth") {
constructor(private readonly email: string, private readonly userRepository: UsersRepository) {
super();
}
async authenticate() {
try {
const user = await this.userRepository.findByEmail(this.email);
const user = await this.userRepository.findByEmailWithProfile(this.email);
if (!user) {
throw new Error("User with the provided email not found");
}