Skip to content

Commit

Permalink
add eid-FI option (#132)
Browse files Browse the repository at this point in the history
* add FI

* Update account sdk browser version to latest

* Update readme
  • Loading branch information
bogdan-niculescu-sch committed Oct 26, 2023
1 parent b521e83 commit 7dd464c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ Take a quick look at its browser code in [index.js](./browser/index.js) and its

## Configuring the server

1. You need a few configs obtained from self service *in the right environment* in order to get
1. You need a few configs obtained from Self-service *in the right environment* in order to get
started. Set your Identity client credentials in the `.env` file in the root folder. To get a
head start you can just copy a template that's already included in the repo (run: `cp
.env-template .env` and fill in the blanks. Take a look at [.env-template](./.env-template) to
see what is needed.
1. Then do a `source .env && npm start`.
1. Then do a `source .env && npm start` or `npm run dev`.

## VSCode batteries included

Expand Down
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ hbs.registerHelper(`isNotSpidProd`, function (opts) {
return ['DEV','PRE'].includes(config.spidEnv) ? opts.fn(this) : opts.inverse(this)
});

hbs.registerHelper(`isSpidProdWithActiveBankID`, function (opts) {
return ['PRO','PRO_NO'].includes(config.spidEnv) ? opts.fn(this) : opts.inverse(this)
hbs.registerHelper(`isSpidProdWithActiveBankId`, function (opts) {
return ['PRO','PRO_NO','PRO_FI'].includes(config.spidEnv) ? opts.fn(this) : opts.inverse(this)
});

app.use(helmet());
Expand Down
5 changes: 3 additions & 2 deletions browser/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@
{{#isNotSpidProd}}
<label><input type="checkbox" value="eid-no" name="login-method" data-only-one-chosen="bankId">BankID NO</label>
<label><input type="checkbox" value="eid-se" name="login-method" data-only-one-chosen="bankId">BankID SE</label>
<label><input type="checkbox" value="eid-fi" name="login-method" data-only-one-chosen="bankId">BankID FI</label>
{{/isNotSpidProd}}
{{#isSpidProdWithActiveBankID}}
{{#isSpidProdWithActiveBankId}}
<label><input type="checkbox" value="eid" name="login-method">BankID</label>
{{/isSpidProdWithActiveBankID}}
{{/isSpidProdWithActiveBankId}}
</fieldset>
<br/>
<hr/>
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
},
"scripts": {
"build": "./build.sh",
"dev": "./watch.sh && nodemon -w . -w browser -w dist server.js",
"dev": "export NODE_OPTIONS=--openssl-legacy-provider && ./watch.sh && nodemon -w . -w browser -w dist server.js",
"lint": "eslint ."
},
"dependencies": {
"@schibsted/account-sdk-browser": "^4.5.0",
"@schibsted/account-sdk-browser": "^4.8.1",
"cookie-parser": "^1.4.4",
"dotenv": "^5.0.0",
"express": "^4.17.1",
Expand Down

0 comments on commit 7dd464c

Please sign in to comment.