Skip to contents

Connects to formr using your normal login and the httr library which supports persistent session cookies. Calling this function will persist the specified host (by default https://rforms.org) in further formr_ function calls. You can change this by calling formr_last_host()

Usage

formr_connect(
  email = NULL,
  password = NULL,
  host = formr_last_host(),
  keyring = NULL
)

Arguments

email

your registered email address

password

your password

host

defaults to formr_last_host(), which defaults to https://rforms.org

keyring

a shorthand for the account you're using. Requires the suggested keyring package; generating a 2FA code from a stored secret additionally requires the suggested otp package. Both are optional so that the package stays installable on platforms without a system credential store (e.g. WebAssembly/webR); in interactive sessions you will be offered to install them the first time they are needed.

Value

Invisibly TRUE on success; called for its side effect of establishing an authenticated cookie session with the formr server (stored in httr's cookie jar).

Examples

if (FALSE) { # \dontrun{
# Not run: needs a live formr server and an authenticated session.
formr_connect(keyring = "formr_diary_study_account" )
} # }