File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module Kracken
4
- class SessionsController < ActionController ::Base
4
+ class SessionsController < ActionController ::Base # rubocop:disable Rails/ApplicationController
5
5
protect_from_forgery with : :exception
6
6
7
- def create
7
+ def create # rubocop:disable Metrics/AbcSize
8
8
@user = user_class . find_or_create_from_auth_hash ( auth_hash )
9
9
session [ :user_id ] = @user . id
10
10
session [ :user_uid ] = @user . uid
@@ -24,10 +24,12 @@ def failure
24
24
render text : "Sorry, but you didn't allow access to our app!"
25
25
end
26
26
27
- protected
27
+ protected
28
28
29
29
def return_to_path
30
- request . env [ 'omniauth.origin' ] || "/"
30
+ return "/" unless request . env [ 'omniauth.origin' ] . starts_with? ( '/' )
31
+
32
+ request . env [ 'omniauth.origin' ]
31
33
end
32
34
33
35
def auth_hash
Original file line number Diff line number Diff line change 1
1
# frozen_string_literal: true
2
2
3
3
module Kracken
4
- VERSION = "0.4.3 "
4
+ VERSION = "0.4.4 "
5
5
end
You can’t perform that action at this time.
0 commit comments