mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Login using api user
This commit is contained in:
parent
99850c3acb
commit
f34bca591e
3 changed files with 19 additions and 1 deletions
|
@ -1,6 +1,15 @@
|
|||
class Registrar::SessionsController < SessionsController
|
||||
layout 'registrar'
|
||||
|
||||
def create
|
||||
@user = ApiUser.first if params[:user1]
|
||||
|
||||
return redirect_to :back, alert: 'No user' if @user.blank?
|
||||
|
||||
flash[:notice] = I18n.t('welcome')
|
||||
sign_in_and_redirect @user, event: :authentication
|
||||
end
|
||||
|
||||
def login
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue