Single Signon

!
To use single sign-on, a number of settings are necessary.

Contact OnlineAfspraken.nl to enable this functionality. This must be enabled per account.

It is necessary that the use of user accounts is enabled. Only customer cards with a user account can automatically log in using single sign-on (SSO).

A customer can be created with the API setCustomer. Because a user is required for SSO, this customer must be created with a username and password, even if they are not used. Fictional usernames and passwords can be used, as long as they meet the requirements for this.

Note: the API loginCustomer is NOT used for SSO. This API is only used to verify a username/password and has no relevance for the SSO implementation.

After the customer has been created, via the API or otherwise, it can be retrieved with the API getCustomer. If SSO is enabled for the account, and the customer has a user account, the response will contain an additional variable called "SingleSignon". This is a string such as "1234568|12345|abcdefgh". This is the SSO hash and is valid for 10 minutes after making the API call.

After this, the standard widget can be loaded with this hash as an extra parameter. This can be a direct link to the widget, or via an embed code (see settings => embed widget). The extra parameter is added to the widget URL as /signon/hash. Example:

https://widget.onlineafspraken.nl/consumer/booking/book/key/xxxxxxxxx-xxxxxx/.../exclude/mobiledetect/output/js/signon/1234568|12345|abcdefgh
The widget will then load with the customer already logged in (provided the hash is still valid). If the hash is not (or no longer) valid, the widget will still function. However, the customer will then see a login screen after selecting an appointment, date, and time.