File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module Kracken
4- class SessionsController < ActionController ::Base
4+ class SessionsController < ActionController ::Base # rubocop:disable Rails/ApplicationController
55 protect_from_forgery with : :exception
66
7- def create
7+ def create # rubocop:disable Metrics/AbcSize
88 @user = user_class . find_or_create_from_auth_hash ( auth_hash )
99 session [ :user_id ] = @user . id
1010 session [ :user_uid ] = @user . uid
@@ -24,10 +24,12 @@ def failure
2424 render text : "Sorry, but you didn't allow access to our app!"
2525 end
2626
27- protected
27+ protected
2828
2929 def return_to_path
30- request . env [ 'omniauth.origin' ] || "/"
30+ return "/" unless request . env [ 'omniauth.origin' ] . starts_with? ( '/' )
31+
32+ request . env [ 'omniauth.origin' ]
3133 end
3234
3335 def auth_hash
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module Kracken
4- VERSION = "0.4.3 "
4+ VERSION = "0.4.4 "
55end
You can’t perform that action at this time.
0 commit comments