Certilia sign-in in a SaaS product
This page describes Certilia sign-in in an application used by several companies (customers), each with its own users and often with its own domain.
One application for all customers or one per customer
Section titled “One application for all customers or one per customer”As a rule, use one application for all customers. When signing in, the user sees the name of your application, not the customer’s name.
- An application has at most 10 redirect URIs, and one space in the portal (personal or an organisation) at most 10 applications.
- If you have more customers with their own domain than that, use one return address on your own domain (e.g.
https://signin.your-domain.com/callback) and after sign-in redirect the user to their customer’s domain. Store the customer in your session, along withstate, before you redirect the user to Certilia. - A separate application per customer is justified only when a customer needs its own name on the sign-in screen or its own list of data about the person.
Distinguishing customers
Section titled “Distinguishing customers”Certilia identifies who signed in (sub, the user’s OIB), but not for which customer. Maintain the link
between users and customers in your application: determine the customer by the domain or by a selection before
sign-in, and after sign-in check that the user with that sub belongs to that customer.
The item “Organisations (business certificates)” lists the organisations for which the user has a business certificate. It can help in suggesting a customer to the user, but it does not give the user authority to represent the organisation.
Secrets
Section titled “Secrets”- An application has one client secret (Client Secret). Keep it on your server only and never share it with customers.
- You see the secret on the application’s page with Show secret. You issue a new one there, and the old one then stops working immediately. Plan a change of secret so that all your instances receive the new secret at the same time.
Create the application in an organisation in the portal (the Team menu), not in your personal profile. The organisation’s owners and administrators can then see and manage it, even when a team member leaves the organisation. You can move an existing application from your personal profile into an organisation.