Skip to main content
Skip table of contents

Signing on with a companion app

Overview

OpenTV Video Platform supports signing on via a companion device. For example, to sign in on a smart TV, the app on the smart TV can generate a code that user enters on the operator’s app on their phone (which is already signed in to the service).

This saves the user having to enter their email and password using a remote control that does not have an alphanumeric keypad.

Sequence of events

Here is how it works:

  1. The user requests companion device sign-on in the application on the device that is not yet signed in (the “registering device”).

  2. The registering device calls OPF’s Device SignOn and Registration Assistant (DSRA) service to request a device registration code.

  3. In its response, DSRA sends the application:

    1. A device registration code that it displays to the user
      Note: this can be displayed as a QR code if required, but this is outside the scope of OPF’s functionality. It is up to the client app developer to implement it.

    2. A DRSA token, which is used in the next request

    3. An expiry period

    4. A polling period

  4. The registering device starts calling (and repeatedly polls, according to the polling period it received above) the DRSA endpoint for requesting a sign-on/activation token, passing the DSRA token obtained in step 2. It continues until it receives a successful response or the expiry period (above) ends.
    This request includes the device information that OPF requires (or the device’s client ID if is has been signed in previously).
    DRSA responds with an HTTP 204 status until it receives the code from the companion app.

  5. The user enters the code in the registering device on the companion device (the “companion app”).
    Alternatively, the user can enter the code in the operator’s web portal (which they are already signed into).
    Note: the registering device will be signed in to the same account as the one that is signed in on the companion device or web portal.

  6. The companion app or web portal calls DSRA to request approval of the sign-on request, passing the device registration code that the user entered.

  7. DRSA responds to the registering device's sign-on/activation request with an HTTP 200 status and response body that includes:

    1. A client ID

    2. A sign-on/activation token

  8. The registering device calls the appropriate Identity and Authorisation Service (IAS) endpoint to sign on using the sign-on/activation token it received in the previous step.

  9. The IAS response includes the access and refresh tokens that the registering device needs for all subsequent requests.

This is illustrated in the following sequence diagram:

Use cases

The above sequence is supported by the following use cases:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.