usps-jwt_auth 1.0.2 → 1.0.4

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: c781ed4980c3faac1cfeb90f7253612f679727339ef373533f576baddd5e4ad8
4
+ data.tar.gz: cad560a810473ce7a876341d1887f4c522c454bfe35006f309109b35d49df69c
5
5
  SHA512:
6
- metadata.gz: edc5b9e45ce5a20695bb7e602d52b11d6e09ec06ca8a2d871f9b12a07a1c939234bbc4eb8fc5f81c01316646046573bc5fd94363c8e2bc1af5a02f33d6005fac
7
- data.tar.gz: d240493a4383fc767a51a4db9d0973af6907c238188ccdb0a5e4454944c6ca095f48ca87d80a0103df11f0f89d66947d67a71418af95fb0b9405070037f75891
6
+ metadata.gz: 14fa9a4ccdb56ad702875f4ac8a61215f52e06546abceb59be1f739b370609fad1a74738c1984cd0576604bb3222f1ed6a67019ad386ebc8bcc714a5ab155dec
7
+ data.tar.gz: 31eaeb93a98ebbc98064d05f8c5f1fc8befe331e632f3e26f4730fa6c5f5d317014d57edf934719329a29c64d79b1825d60012f39658fba60f59d443685c6e48
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.4)
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: params[: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.4'
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.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander