We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4491f70 commit 1364cbdCopy full SHA for 1364cbd
examples/passport.ts
@@ -1,5 +1,9 @@
1
import * as client from 'openid-client'
2
-import { Strategy, type VerifyFunction } from 'openid-client/passport'
+import {
3
+ Strategy,
4
+ type VerifyFunction,
5
+ type StrategyOptions,
6
+} from 'openid-client/passport'
7
8
import express from 'express'
9
import cookieParser from 'cookie-parser'
@@ -43,7 +47,12 @@ let verify: VerifyFunction = (tokens, verified) => {
43
47
verified(null, tokens.claims())
44
48
}
45
49
46
-passport.use(new Strategy({ config, scope }, verify))
50
+let options: StrategyOptions = {
51
+ config,
52
+ scope,
53
+}
54
+
55
+passport.use(new Strategy(options, verify))
56
57
passport.serializeUser((user: Express.User, cb) => {
58
cb(null, user)
0 commit comments