Method: Mints::AdminBaseController#mints_user_login
- Defined in:
- lib/mints/controllers/admin_base_controller.rb
permalink #mints_user_login(email, password) ⇒ Object
Mints user Login.
Starts a user session in mints.cloud and set a session cookie
19 20 21 22 23 24 25 26 |
# File 'lib/mints/controllers/admin_base_controller.rb', line 19 def mints_user_login(email, password) # Login in mints response = @mints_user.login(email, password) # Get session token from response session_token = response['api_token'] # Set a permanent cookie with the session token [:mints_user_session_token] = { value: session_token, secure: true, httponly: true, expires: 1.day } end |