Skip to content

Commit

Permalink
Merge pull request #1 from affinidi/paramesh
Browse files Browse the repository at this point in the history
fixed code review commented
  • Loading branch information
kamarthiparamesh authored Oct 1, 2023
2 parents b99d3a5 + a5345e4 commit badb3a8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
10 changes: 2 additions & 8 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
Makefile
docs/
examples/
reports/
test/

.jshintrc
.travis.yml
.*
src/
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"name": "passport-affinidi",
"version": "0.0.7",
"version": "0.0.8",
"description": "Affinidi (OAuth 2.0) authentication provider using passport and open-connect",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"/dist"
],
"scripts": {
"build": "shx rm -rf dist && tsc -b",
"lint": "eslint . --ext .ts",
Expand Down Expand Up @@ -50,6 +54,6 @@
"node": ">= 0.4.0"
},
"directories": {
"lib": "lib"
"lib": "dist"
}
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const affinidiProvider = async (app: any, options: ProviderOptionsType) =
resave: false,
saveUninitialized: true,
cookie: {
secure: process.env.NODE_ENV === 'production', // Crucial
maxAge: 1000 * 60 * 60 * 24 * 1, // 30 days
secure: process.env.NODE_ENV === 'production',
maxAge: 1000 * 60 * 60 * 24 * 1, // 1 day
},
unset: 'destroy',
...options.expressSesssion,
Expand Down
2 changes: 1 addition & 1 deletion src/strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default async function AffinidiStrategy(options: ProviderOptionsType) {

//discover the wellknown for issuer
const affinidi = await Issuer.discover(options.issuer)
console.log('Discovered issuer %s %O', affinidi.issuer, affinidi.metadata)
//console.log('Discovered issuer %s %O', affinidi.issuer, affinidi.metadata)
const sessionKey = `oidc:${options.id || 'affinidi'}-session-key`

var client = new affinidi.Client({
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"compilerOptions": {
"module": "Node16",
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",
"rootDir": "src",
"target": "ES2020",
"moduleResolution": "Node16",
"declaration": true,
"importHelpers": true,
"esModuleInterop": true,
Expand Down

0 comments on commit badb3a8

Please sign in to comment.