getOrganizationToken method

Future<AccessToken?> getOrganizationToken(
  1. String organizationId
)

Implementation

Future<AccessToken?> getOrganizationToken(String organizationId) async {
  if (config.scopes == null ||
      !config.scopes!
          .contains(logto_core.LogtoUserScope.organizations.value)) {
    throw LogtoAuthException(LogtoAuthExceptions.missingScopeError,
        'organizations scope is not specified');
  }

  return await getAccessToken(organizationId: organizationId);
}