Method: Mints::Contact#magic_link_login

Defined in:
lib/contact.rb

Starts a contact session with a token received in the contact email. The token will be received by send_magic_link method.

Parameters

token

(String) – The email token that will be used to log in.

Example

@mints_contact.(
  "d8618c6d-a165-41cb-b3ec-d053cbf30059:zm54HtRdfHED8dpILZpjyqjPIceiaXNLfOklqM92fveBS0nDtyPYBlI4CPlPe3zq"
)


117
118
119
120
121
122
123
# File 'lib/contact.rb', line 117

def (token)
  response = @client.raw("get", "/contacts/magic-link-login/#{token}", nil, '/api/v1')
  if response.key? "session_token"
    @client.session_token = response["session_token"]
  end
  return response
end