usps-jwt_auth 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23bf923a9eb8f5d4bc46df5bab818533108108b7ec1d9b74d7302f0af35e0a86
4
- data.tar.gz: e16cc47bba20f9c69fc0a5077d7f1401d99275ebf042d7d842d43bc76737c475
3
+ metadata.gz: 9e2e8d2e027497bac633a3d08728ba3b5da05a0d014db956cf584c1a67a6a752
4
+ data.tar.gz: 43c9b06965566235745ef4b5840ceb52d3fdc01ea842a60c918d869292954e8f
5
5
  SHA512:
6
- metadata.gz: edc5b9e45ce5a20695bb7e602d52b11d6e09ec06ca8a2d871f9b12a07a1c939234bbc4eb8fc5f81c01316646046573bc5fd94363c8e2bc1af5a02f33d6005fac
7
- data.tar.gz: d240493a4383fc767a51a4db9d0973af6907c238188ccdb0a5e4454944c6ca095f48ca87d80a0103df11f0f89d66947d67a71418af95fb0b9405070037f75891
6
+ metadata.gz: 5a8aa980af7439ac3c50d54c4524be031b8adf0336039f292859adeaae5a990e8ada983e031eb935cb6cc7b618fe91df83af46a7d079f9588b66a8da3b2ef568
7
+ data.tar.gz: d5af62f82f8e8b57109d7576a0fd2a477d3523c47bf75620f833d01fdf548cd402c0ed9ed31b636aec9018ef86d2080527ec122554c1f7e5b825d54caad17f8f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- usps-jwt_auth (1.0.2)
4
+ usps-jwt_auth (1.0.3)
5
5
  activesupport (~> 8.0)
6
6
  colorize (~> 1.1)
7
7
  fileutils (~> 1.7)
@@ -73,10 +73,18 @@ module Usps
73
73
  store_jwt(params[:jwt])
74
74
  ensure_valid_jwt_has_valid_member!
75
75
 
76
- redirect_to(params[:path] || root_path)
76
+ redirect_to_path!
77
77
  @set_new_jwt = true
78
78
  end
79
79
 
80
+ def redirect_to_path!
81
+ if params.key?(:query_string)
82
+ redirect_to(params[:path] || root_path, query_string: query_string)
83
+ else
84
+ redirect_to(params[:path] || root_path)
85
+ end
86
+ end
87
+
80
88
  def store_jwt(token)
81
89
  session[:jwt] = token
82
90
  cookies[:jwt] = { value: token, domain: cookie_domain, httponly: true }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module JwtAuth
5
- VERSION = '1.0.2'
5
+ VERSION = '1.0.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-jwt_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander