beginOauthFlow

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

Initiate a web-based OAuth sign-in flow.

This method initializes some internal state and then returns a URL at which the user may perform a web-based authorization flow to connect the application to their account. The application should direct the user to the provided URL.

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

Arguments

  • 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.