class GdsApi::AccountApi

def get_sign_in_url(redirect_path: nil, mfa: false)

Returns:
  • (Hash) - An authentication URL and the OAuth state parameter (for CSRF protection)

Parameters:
  • mfa (Boolean, nil) -- whether to authenticate the user with MFA or not
  • redirect_path (String, nil) -- path on GOV.UK to send the user to after authentication
def get_sign_in_url(redirect_path: nil, mfa: false)
  querystring = nested_query_string(
    {
      redirect_path:,
      mfa:,
    }.compact,
  )
  get_json("#{endpoint}/api/oauth2/sign-in?#{querystring}")
end