Merge branch 'main' of git.targo.ca:Targo/targo_backend
This commit is contained in:
commit
6488082290
|
|
@ -50,11 +50,9 @@ export class AuthentikStrategy extends PassportStrategy(OIDCStrategy, 'openidcon
|
||||||
): Promise<any> {
|
): Promise<any> {
|
||||||
try {
|
try {
|
||||||
const email = profile.emails?.[0]?.value;
|
const email = profile.emails?.[0]?.value;
|
||||||
console.log('email: ', email);
|
|
||||||
if (!email) return cb(new Error('Missing email in OIDC profile'), false);
|
if (!email) return cb(new Error('Missing email in OIDC profile'), false);
|
||||||
|
|
||||||
const user = await this.authentikAuthService.validateUser(email);
|
const user = await this.authentikAuthService.validateUser(email);
|
||||||
console.log('user: ', user);
|
|
||||||
if (!user) return cb(new Error('User not found'), false);
|
if (!user) return cb(new Error('User not found'), false);
|
||||||
|
|
||||||
return cb(null, user);
|
return cb(null, user);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user