Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 1x 1x 3x 3x | import { RequestHandler } from 'express'; import session from 'express-session'; import { Application } from '@feathersjs/feathers'; export interface OauthSetupSettings { authService: string; linkStrategy: string; expressSession: RequestHandler; } export const getDefaultSettings = (app: Application, other?: Partial<OauthSetupSettings>) => { const defaults: OauthSetupSettings = { authService: app.get('defaultAuthentication'), linkStrategy: 'jwt', expressSession: session({ secret: Math.random().toString(36).substring(7), saveUninitialized: true, resave: true }), ...other }; return defaults; }; |