Upgrade 2.0.0 - 2.1.0
In this version, there is break changes happened because OpenSSO now adding new security flow, you can just replace it, it will be more easier, but if you have already modified OpenSSO code by yourself, then you should consider about these files:
root
├── views/
│ └── default/email-otp-pin.html
├── views/
│ └── inverse/email-otp-pin.html
├── generate-base32.mjs
.
root
├── lib/
│ └── helper.js
├── routes/
│ ├── oauth.js
│ └── user.js
├── views/
│ └── default/
│ ├── backend/
│ │ ├── dashboard.html
│ │ └── my_profile.html
│ ├── email-otp.html
│ └── sso-login.html
├── views/
│ └── inverse/
│ ├── backend/
│ │ ├── dashboard.html
│ │ └── my_profile.html
│ ├── email-otp.html
│ └── sso-login.html
├── changelog.md
├── config.default.js
├── config.js
├── Dockerfile
├── docker-compose.yml
├── package-lock.json
├── package.json
├── server.js
.
How to manually Upgrade ?
Please attention, in this upgrade, there is a small break changes. So you need to be careful to follow this upgrade steps.
Please Remember to always backup before doing any upgrades.
To increase the successful possibilty when doing upgrading, always try on your local computer first.
1. Replace the old package-lock.json and package.json.
Just replace it with newer file from this version.
2. Replace the old Dockerfile and docker-compose.json (optional).
You can skip this if you don't use docker or if you have your own docker configuration.
3. Delete current node_modules directory.
npm ci
It will automatically installing the package identically same as package-lock.json.
4. Done
Now you can try to run the OpenSSO application.
node server.js
or
npm start
What changes to the server.js ?
The server option for maxParamLength is moved to inside routerOptions.
const server = require('fastify')({
logger: config.logger,
trustProxy: helper.getConfig('trustProxy', false),
routerOptions: {
maxParamLength: config.maxParamLength
}
})
What changes to the config.js ?
I added new emailSecret, you have to add it in your current config.js.
You have to generate new email secret by running this command.
npm run generate:base32
it will print the new generated base32 for you. Just copy and paste it to emailSecret.
What changes to the views ?
dashboard.html- There is modified api calls, listener event and added new row for select option month and year.my_profile.html- There is new flow when user change their emails, it will send otp to their old email.email-otp.html- Only delete small textseconds.sso-login.html- There added new detection url parameter forformandtheme.
Use git so you will know all the changes.