beginPairingFlow

abstract fun beginPairingFlow(pairingUrl: String, scopes: List<String>, entrypoint: String): String

Initiate a device-pairing sign-in flow.

Once the user has scanned a pairing QR code, pass the scanned value to this method. It will return a URL to which the application should redirect the user in order to continue the sign-in flow.

When the resulting flow redirects back to the configured redirect_uri, the resulting OAuth parameters should be extracting from the URL and passed to FirefoxAccount::complete_oauth_flow to finalize the signin.

Arguments

  • pairing_url - the URL scanned from a QR code on another device.

  • scopes - list of OAuth scopes to request.

    • The requested scopes will determine what account-related data the application is able to access.

  • entrypoint - metrics identifier for UX entrypoint.

    • This parameter is used for metrics purposes, to identify the UX entrypoint from which the user triggered the signin request. For example, the application toolbar, on the onboarding flow.

  • metrics - optionally, additional metrics tracking parameters.

    • These will be included as query parameters in the resulting URL.