Skip to content

Commit

Permalink
Merge pull request #51 from affinidi/paramesh
Browse files Browse the repository at this point in the history
fix: updated options
  • Loading branch information
kamarthiparamesh authored Feb 6, 2024
2 parents 3065177 + 8624036 commit bea93ec
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ export const affinidiProvider = async (app: any, options: ProviderOptionsType) =
passport.use(options.id, strategy)

app.use(
expressSesssion(
options.expressSesssion || {
secret: options.id,
resave: false,
saveUninitialized: true,
cookie: {
secure: process.env.NODE_ENV === 'production',
maxAge: 1000 * 60 * 60 * 24 * 1, // 1 day
},
unset: 'destroy',
expressSesssion({
secret: options.id,
resave: false,
saveUninitialized: true,
cookie: {
secure: process.env.NODE_ENV === 'production',
sameSite: 'none',
maxAge: 1000 * 60 * 60 * 24 * 1, // 1 day
},
),
unset: 'destroy',
...options.expressSesssion,
}),
)

if (options.passport?.initializeSession === true) {
Expand Down

0 comments on commit bea93ec

Please sign in to comment.