getAuthorizationPageUrl method

String getAuthorizationPageUrl({
  1. required List<Scope> scopes,
  2. required String state,
})

Returns an authorization URL to be used in a web for to allow the user to authorize the application.

Implementation

String getAuthorizationPageUrl({
    required List<Scope> scopes, required String state}) {
  Uri authUri = Uri.parse(authorizationEndpoint);
  authUri = _appendQueryParamsToUri(authUri,
      {
        "client_id": clientId,
        "scope": scopes.map((e) => e.scope).join(" "),
        "session": "False",
        "state": state,
        //"redirect_uri": redirectUrl,
        //"response_type": "code",

      });
  return authUri.toString();
}