Skip to content

Commit

Permalink
clean up & corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
codaimaster committed Aug 18, 2023
1 parent 7e057c2 commit 67faa99
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 1,786 deletions.
Binary file removed .yarn/install-state.gz
Binary file not shown.
28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

873 changes: 0 additions & 873 deletions .yarn/releases/yarn-3.5.0.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.1.cjs

This file was deleted.

7 changes: 0 additions & 7 deletions .yarnrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/rpx-xui-node-lib",
"version": "3.0.0-Node18Upgrade-1",
"version": "3.0.0-Node18Upgrade-2",
"description": "Common Nodejs library components for XUI",
"main": "dist/index",
"types": "dist/index.d.ts",
Expand Down
12 changes: 9 additions & 3 deletions src/auth/models/strategy.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export abstract class Strategy extends events.EventEmitter {
req.logout((err: any) => {
this.logger.log('Logout')
})

await this.destroySession(req)
/* istanbul ignore next */
if (req.query.noredirect) {
Expand Down Expand Up @@ -226,7 +227,7 @@ export abstract class Strategy extends events.EventEmitter {

this.serializeUser()
this.deserializeUser()
;(async () => {
; (async () => {
await this.initialiseStrategy(this.options)
})()

Expand Down Expand Up @@ -452,9 +453,14 @@ export abstract class Strategy extends events.EventEmitter {
}
/* istanbul ignore next */
public deserializeUser = (): void => {
passport.deserializeUser((id, done) => {
passport.deserializeUser((id, done: (err: any, user?: Express.User | false | null) => void) => {
this.logger.log(`${this.strategyName} deserializeUser`)
// this.emitIfListenersExist(AUTH.EVENT.DESERIALIZE_USER, id, done)
this.emitIfListenersExist(AUTH.EVENT.DESERIALIZE_USER, id, (err, id) => {
console.debug(`Done deserializeUser |${id}|`)
if (err) {
console.error(err)
}
})
})
}

Expand Down

0 comments on commit 67faa99

Please sign in to comment.