oauth_im 0.13.2 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbc27c0f6156c8c268aa642b7bb93ec558df3242ba4935bf6108d25b943e22a7
|
4
|
+
data.tar.gz: bd9bcc76ee46fef4b1d592bf6ad1f27d847aac830195e82d13c878009858fb0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b00319d1bf052c6bcfbceac00337ee736d029f797be234dbe96e90c0d02a266dff7382a7075779947aec7b5f3dd448fbd366b84baff2ffa41b8803885cdc32fe
|
7
|
+
data.tar.gz: eb03efb12c05c9f5785ce4cb5d852a940f082c269decc536ffe2bcb98698931a742c885f92db1b666c0bed51d88d5c214a3f9295dab76f537aced0cd0b965de4
|
@@ -9,13 +9,27 @@ module OauthIm
|
|
9
9
|
|
10
10
|
def callback
|
11
11
|
session[:user_jwt] = user_jwt
|
12
|
-
|
12
|
+
callback_redirect
|
13
13
|
rescue StandardError => e
|
14
14
|
Rollbar.warning "rescue OauthIm::ClientController#callback: #{request.original_url} #{e.message}"
|
15
15
|
redirect_to oauth_rescue_redirect_path
|
16
16
|
end
|
17
17
|
|
18
|
+
def callback_redirect
|
19
|
+
# Fetch the original page the user was on just prior to logging in.
|
20
|
+
# If it's not available, default to the root path.
|
21
|
+
referer_path = session.fetch(:oauth_im_login_referer, '').strip
|
22
|
+
if referer_path.empty?
|
23
|
+
redirect_to main_app.root_path
|
24
|
+
else
|
25
|
+
redirect_to referer_path
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
18
29
|
def login
|
30
|
+
# Set the referer path, if available, so that we can put the user
|
31
|
+
# back on the page they were at before they decided the log in.
|
32
|
+
session[:oauth_im_login_referer] = request.referer
|
19
33
|
redirect_to oauth_client.login_url
|
20
34
|
end
|
21
35
|
|
data/lib/oauth_im/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oauth_im
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Connally
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fusionauth_client
|