Skip to content

SSO (Single Sign-On)

This article will guide you through an integration with the Partisia SSO.

The SSO is a service for authentication of users. Here the user can create a new account and log into the account.

Demo environment

For the demo environment, the url is:

SSO_BASE_URL = https://authentication.platform.demo1.partisia.com

Redirect to SSO

When you want the user to login, the user should be redirected to one of the two:

SSO_BASE_URL/login?redirect=REDIRECT_URL
SSO_BASE_URL/signup?redirect=REDIRECT_URL

where REDIRECT_URL is the url of your own application that the user should be sent back to.

SSO Token

On completed login, the user will be redirected with the url:

REDIRECT_URL?token=SSO_TOKEN

where SSO_TOKEN is a Json Web Token (JWT) containing the user's ID as the subject of the JWT. The user ID is a 42 character hex string. The payload also contains additional information about the user such as name, date of birth and email. An example of the payload can be seen below.

Header

{
    "alg":"ES256",
    "typ":"JWT"
}

Payload example

{
    "sub":"00cf2a79bdb281b929d8072a983070d30b97b98e72",
    "firstName":"Jane",
    "lastName":"Doe",
    "dateOfBirth":"1982-07-23",
    "email":"jane.doe@mail.com",
    "exp":1713282850
}

Optional parameters

State parameter

The SSO also accepts the state URI parameter:

SSO_BASE_URL/login?redirect=REDIRECT_URL&state=STATE_STRING

The value of the parameter will be applied to the redirect URL on redirection:

REDIRECT_URL?token=SSO_TOKEN&state=STATE_STRING

Partisia All Rights Reserved © 2023