loginflow

Implements the anonymous side of the login flow for enrolling the Nextcloud Desktop sync client without a password.

Package
github.com/cs3org/reva/v3/internal/http/services/loginflow
Source
internal/http/services/loginflow · Go reference

Enable it

Add this table to the revad configuration file:

[http.services.loginflow]
# settings below

Overview

Package loginflow implements the anonymous side of the login flow for enrolling the Nextcloud Desktop sync client without a password. It lives under /index.php/login/v2 because that is the path sync clients expect.

This service holds only the endpoints the sync client and the browser hit unauthenticated: init, poll, and the browser redirect. The authenticated user actions (info, grant, deny) live in the OCS service, behind the auth middleware, next to the connected-clients management API.

Configuration

config

KeyTypeDefaultDescription
server_base_urlstring-source
webui_urlstringsame as server_base_urlsource
flow_ttl_secondsint1200source
appauth_driverstring"json"source
appauth_driversmap[string]map[string]any-source
store_driverstring"sql"source
store_driversmap[string]map[string]any-source
ratelimitrateLimitConfig-source

rateLimitConfig

KeyTypeDefaultDescription
syncclient_per_ip_per_minint-SyncClientPerIPPerMin is the per-IP limit shared by all routes. source
poll_per_token_per_minint-source
poll_wait_msint-source
trusted_proxy_cidrs[]string-TrustedProxyCIDRs lists the reverse proxies whose X-Forwarded-For header identifies the client for the per-IP limit. source