Method: Mints::Contact#magic_link_login
- Defined in:
- lib/contact.rb
#magic_link_login(token) ⇒ Object
Magic Link Login.
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.magic_link_login(
"d8618c6d-a165-41cb-b3ec-d053cbf30059:zm54HtRdfHED8dpILZpjyqjPIceiaXNLfOklqM92fveBS0nDtyPYBlI4CPlPe3zq"
)
55 56 57 58 59 60 61 |
# File 'lib/contact.rb', line 55 def magic_link_login(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 |