Refactor connexion manager

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
Gregoire Parant
2022-03-20 14:33:25 +01:00
parent 29a0b9c5ae
commit e618dc6c3d
2 changed files with 10 additions and 10 deletions
@@ -13,14 +13,14 @@ export class OpenIdProfileController extends BaseHttpController {
}
try {
const resCheckTokenAuth = await openIDClient.checkTokenAuth(accessToken as string);
if (!resCheckTokenAuth.email) {
if (!resCheckTokenAuth.sub) {
throw new Error("Email was not found");
}
res.send(
this.buildHtml(
OPID_CLIENT_ISSUER,
resCheckTokenAuth.email as string,
resCheckTokenAuth.picture as string | undefined
resCheckTokenAuth.sub as string
/*resCheckTokenAuth.picture as string | undefined*/
)
);
return;