diff --git a/libs/oidc/CHANGELOG.md b/libs/oidc/CHANGELOG.md index 8019bf9..ab8995b 100644 --- a/libs/oidc/CHANGELOG.md +++ b/libs/oidc/CHANGELOG.md @@ -5,6 +5,8 @@ - [Changelog](#changelog) + - [0.26.4 (2023-10-04)](#0264-2023-10-04) + - [Bugfixes](#bugfixes) - [0.26.3 (2023-01-10)](#0263-2023-01-10) - [Bugfixes](#bugfixes) - [0.26.2 (2023-01-03)](#0262-2023-01-03) @@ -157,11 +159,17 @@ +## 0.26.4 (2023-10-04) + +### Bugfixes + +- Bugfix creating new `strategy` object passed into `passport.authenticate` in oidc.service + ## 0.26.3 (2023-01-10) ### Bugfixes -- Bugfix updating the ```logout``` method in oidc.service to be asynchronous, to follow breaking change in passport 0.6.0 +- Bugfix updating the `logout` method in oidc.service to be asynchronous, to follow breaking change in passport 0.6.0 ## 0.26.2 (2023-01-03) diff --git a/libs/oidc/package.json b/libs/oidc/package.json index db1e67b..7de6d8e 100644 --- a/libs/oidc/package.json +++ b/libs/oidc/package.json @@ -1,6 +1,6 @@ { "name": "@finastra/nestjs-oidc", - "version": "0.26.3", + "version": "0.26.4", "contributors": [ "David Boclé ", "Francine Ong ", @@ -29,4 +29,4 @@ "connect-mongo": "4.6.0", "@types/mongodb": "^4.0.6" } -} +} \ No newline at end of file diff --git a/libs/oidc/src/services/oidc.service.ts b/libs/oidc/src/services/oidc.service.ts index fba2166..9f1153a 100644 --- a/libs/oidc/src/services/oidc.service.ts +++ b/libs/oidc/src/services/oidc.service.ts @@ -3,7 +3,7 @@ import axios from 'axios'; import { Request, Response } from 'express'; import * as handlebars from 'handlebars'; import { JWKS } from 'jose'; -import { Client, custom, Issuer } from 'openid-client'; +import { Client, Issuer, custom } from 'openid-client'; import { stringify } from 'querystring'; import { v4 as uuid } from 'uuid'; import { ChannelType, IdentityProviderOptions, OidcModuleOptions } from '../interfaces'; @@ -165,7 +165,7 @@ export class OidcService implements OnModuleInit { 'utf-8', ).toString('base64'); passport.authenticate( - strategy, + Object.create(strategy), { ...req['options'], failureRedirect: `${prefix}/login`,