lockie 0.3.3 → 0.3.4

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: 4d9b6208ff552c48fcd48bf7dac345af06b688c598d8007248aa0b1801959b99
4
- data.tar.gz: b597f952ff77c9881ef7e4ab6f8a79f424c3265c3d84e673e0a1743725d5b733
3
+ metadata.gz: 5ee73ebd0d83d510942864ae11dad538c578fa4b396fad352d6c4f1602fdfbd5
4
+ data.tar.gz: 5fce20025be471f55631caa7d6d9ce874b640b838e517662e0d26acd6f576e42
5
5
  SHA512:
6
- metadata.gz: 7878cb4bfe31f051b5f063c4467b52bde16494f8dde23661012414b5562b3dd65dfc20d005210582a0854fff51240b64faee18669b5355e67b4e27ebc4e40818
7
- data.tar.gz: f7967811725b81454729fdb33711e69441e843efe65affb96dca44d266add3c7897f52c746898f163affa1061580d3aeb183d1c2b6409a4983f8ab82c30aabe8
6
+ metadata.gz: 5005acb3551a23b03aa7e6e1a87e0224c054fde2e1768cf84c3d278064ab1f9ff8b525d0a4c209dfa48cf11340b74935e13a14cdaa04f7b12c6b69c7c27a71b8
7
+ data.tar.gz: a002a2bd09c46b611a0d1ac544f65c74dd93bc69c632da534d12cc3e869e93cc73bd10d1056645d6c00c63ad18474eaebc759125cc2e4331a7aa87df08449b12
@@ -34,9 +34,12 @@ module Lockie
34
34
  flash[type] = message if message
35
35
  self.status = 302
36
36
  if Lockie.config.callback_url
37
- callback_url = request.base_url + request.original_fullpath
38
37
  uri = URI(warden_options[:unauthenticated_path] || Lockie.config.unauthenticated_path)
39
- uri.query = (uri.query.to_s.split("&") << "callback_url=#{ callback_url }").join("&")
38
+ # only add callback_url if original path is not the same with login path
39
+ unless request.original_fullpath == uri.path
40
+ callback_url = request.base_url + request.original_fullpath
41
+ uri.query = (uri.query.to_s.split("&") << "callback_url=#{ callback_url }").join("&")
42
+ end
40
43
  redirect_to uri.to_s
41
44
  else
42
45
  redirect_to Lockie.config.unauthenticated_path
@@ -1,3 +1,3 @@
1
1
  module Lockie
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Melvin Sembrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-06 00:00:00.000000000 Z
11
+ date: 2021-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails