Method: Auth0::Api::V2::Users#put_all_user_authentication_methods

Defined in:
lib/auth0/api/v2/users.rb

#put_all_user_authentication_methods(user_id, body) ⇒ Object Also known as: update_all_user_authentication_methods

Updates all authentication methods by replacing them with the given ones

Parameters:

  • user_id (string)

    The user ID of the authentication methods to get

  • body (hash array)

    The mehods to update

    • :type [string] “phone” or “email” or “totp” or “webauthn-roaming”

    • :name [string] A human-readable label to identify the authentication method (optional)

    • :totp_secret [string] Base32 encoded secret for TOTP generation (optional)

    • :phone_number [string] Applies to phone authentication methods only. The destination phone number used to send verification codes via text and voice (optional)

    • :email [string] Applies to email authentication methods only. The email address used to send verification messages (optional)

    • :preferred_authentication_method [string] Preferred phone authentication method (optional)

Raises:

See Also:



401
402
403
404
405
406
# File 'lib/auth0/api/v2/users.rb', line 401

def put_all_user_authentication_methods(user_id, body)
  raise Auth0::MissingUserId, 'Must supply a valid user_id' if user_id.to_s.empty?
  raise Auth0::MissingParameter, 'Must supply a body' if body.to_s.empty?

  put "#{users_path}/#{user_id}/authentication-methods", body
end