Class: ForestLiana::SessionsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- ForestLiana::SessionsController
- Defined in:
- app/controllers/forest_liana/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create_with_google ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'app/controllers/forest_liana/sessions_controller.rb', line 22 def create_with_google @error_message = nil forest_token = params['forestToken'] rendering_id = params['renderingId'] project_id = params['projectId'] two_factor_token = params['token'] two_factor_registration = params['twoFactorRegistration'] process_login( use_google_authentication: true, rendering_id: rendering_id, project_id: project_id, auth_data: { forest_token: forest_token }, two_factor_registration: two_factor_registration, two_factor_token: two_factor_token, ) end |
#create_with_password ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/forest_liana/sessions_controller.rb', line 3 def create_with_password @error_message = nil rendering_id = params['renderingId'] project_id = params['projectId'] email = params['email'] password = params['password'] two_factor_token = params['token'] two_factor_registration = params['twoFactorRegistration'] process_login( use_google_authentication: false, rendering_id: rendering_id, project_id: project_id, auth_data: { email: email, password: password }, two_factor_registration: two_factor_registration, two_factor_token: two_factor_token, ) end |