An Express.js app that authenticates with an IFS Cloud instance using Passport.js and openid-client.
This implementation is only meant for educational purposes. It is not an official implemntation. The implementation details of the underlying system may change without notice.
- An IFS Cloud instantce that you have admin access to.
- Node.js version
>=14.16
to run the app.
- Create an IAM Client:
- Provide a Client ID (Copy this for later use).
- Enabled: Yes.
- Service Account: Yes.
- Redirect URIs:
[ '<your_app_root_url>', '<your_app_root_url>/login/callback' ]
. - Service User: Create one, or use an existing user.
- Save.
- Copy the generated Client Secret (You may need to regenerate the client secret).
- Clone this repository and download dependencies:
git clone https://github.com/sampathsris/ifs-cloud-app-proto.git cd ifs-cloud-app-proto pnpm install # or npm install # or yarn
- Create a
.env
file in the root of the repository:IFS_SYSTEM_URL=# System URL of the IFS Cloud Instance IFS_NAMESPACE=# Name of the IFS Customer Namespace CLIENT_ID=# Previously copied Client ID CLIENT_SECRET=# Previously copied Cliet Secret SESSION_SECRET=# A random string # Use this only if there is a self-signed certificate in the chain # Warning: Using this in production systems will probably create a # security issue enabling MITM attacks. NODE_TLS_REJECT_UNAUTHORIZED=0
- Run the app:
pnpm start # or npm start # or yarn start
MIT