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'
)


123
124
125
126
127
128
# File 'lib/contact.rb', line 123

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

  response
end