Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
better sintax, using default devise method inside login_pass after 'w…
Browse files Browse the repository at this point in the history
…adern.auth do' to verify password and call sign_method, redirectin to root path with notice in the correct local of front end to correct the issue heartcombo/devise#5446 in this project
  • Loading branch information
JesusGautamah committed Feb 1, 2023
1 parent 6ba1a47 commit 12379ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/users/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Users::SessionsController < Devise::SessionsController
def create
self.resource = warden.authenticate!(auth_options) do |user|
if user.valid_password?(params[:user][:password])
set_flash_message!(:notice, :signed_in)
sign_in(resource_name, resource)
else
return login_failed
Expand All @@ -31,7 +30,8 @@ def create
# end

def login_pass
redirect_to root_path, notice: "Login success"
set_flash_message!(:notice, :signed_in)
respond_with resource, location: after_sign_in_path_for(resource)
end

def login_failed
Expand Down
2 changes: 1 addition & 1 deletion osbc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.email = ["lima.jesuscc@gmail.com"]

spec.summary = "Outerspace Web Blockchain Framework implementation in Ruby"
spec.description = "Outerspace Web Blockchain Framework implementation in Ruby using Rails, Docker and Firestore, instable and under development.
spec.description = "Outerspace Web Blockchain Framework implementation in Ruby using Rails, Docker and Firestore, unstable and under development.
Please visit https://github.com/JesusGautamah/outerspace-blockchain for more information."
spec.homepage = "https://github.com/JesusGautamah/outerspace-blockchain"
spec.license = "MIT"
Expand Down

0 comments on commit 12379ba

Please sign in to comment.