Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed code review commented #1

Merged
merged 1 commit into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading