Skip to main content
Version: 2.0.0 (latest)

Upgrade 1.6.0 - 2.0.0

In this version, there is a changes but not really affect to the core system, 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:

File New
root
├── eslint.config.cjs
.
File Changes
root
├── database/
│ ├── db.mysql.sql
│ └── db.postgre.sql
├── lib/
│ ├── helper.js
│ └── connection.js
├── schemas/
│ └── user.js
├── test/
│ └── helper.js
├── views/
│ └── default/
│ ├── backend/
│ │ ├── data_user.html
│ │ └── example_data.html
│ ├── contact.html
│ ├── forgot-password.html
│ ├── sign-in.html
│ ├── sign-up.html
│ └── sso-login.html
├── views/
│ └── inverse/
│ ├── backend/
│ │ ├── data_user.html
│ │ └── example_data.html
│ ├── contact.html
│ ├── forgot-password.html
│ ├── sign-in.html
│ ├── sign-up.html
│ └── sso-login.html
├── .gitlab-ci.yml
├── .gitignore
├── changelog.md
├── Dockerfile
├── docker-compose.yml
├── package-lock.json
├── package.json
.

How to manually Upgrade ?

Please attention, in this upgrade, there is a changes but not really affect to the core system. You can skip the changes on lib, schemas, test and views.

Always Backup

Please Remember to always backup before doing any upgrades.

Try on local

To increase the successful possibilty when doing upgrading, always try on your local computer first.

1. Replace the old Dockerfile and docker-compose.json.

Just replace it with newer file from this version or you can skip this if you have modified it with your own setup.

2. Replace the old package-lock.json and package.json.

Just replace it with newer file from this version.

3. Delete current node_modules directory.

Then run this command
npm install

It will automatically installing the new package and dependencies.

4. Done

Now you can try to run the OpenSSO application.

node server.js

or

npm start

What changes to the views ?

The changes on the views is just modify the regex on username and email.

Email

The regex email in the old version is using minLength 7, but the new version is using minLength 6, which is more flexible.

You can try to search all files by this keyword

/^(?=.{1,64}@)[a-z0-9._%+-]+@([a-z0-9-]+\.)+[a-z]{2,}$/

then replace it with

/^(?=.{1,64}@)[a-z0-9]+([._+-][a-z0-9]+)*@([a-z0-9-]+\.)+[a-z]{2,}$/

Username

The username in the old version is allowed consecutive, but the new version is doesn't allow it.

You can try to search all files by this keyword

/^[a-z0-9_.+]{3,64}$/

then replace it with

/^(?=.{3,64}$)[a-z0-9]+([._+-][a-z0-9]+)*$/
tip

Use git so you will know all the changes.