self-auth-rails 0.1.3 → 0.1.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: 8f810144382bd25fa0222496cef327c9173e64be241d92936bc48081974e8e05
4
- data.tar.gz: 0efab5872279cfc516d50cdc4d6bc840a97c60262b4e35c7d37c81ee12cb75e1
3
+ metadata.gz: bf781d804c0ffa2b64e556ee4e4ff2ae9dd7779238270f07fc52a1195d248919
4
+ data.tar.gz: e14c79f5e3707d3746bb68cab347e3188ca7b87a6953baebf550bd128a1e6a8b
5
5
  SHA512:
6
- metadata.gz: 9c1050ec2e42551cd0c627e25d6aac96e5d69996c422249f781604ee28b7c89f1cda292df733fd66f19bb8755453cd3a57f275a40d183d8b6febcc1fbb6f540f
7
- data.tar.gz: bed299ce81b58f2a1135a97e04db73de7d29c37c0516a19746dfd909cc3830c13c5b32028526c75f988fc56225dbfef1d694444582eca3de5c000ce1419b4418
6
+ metadata.gz: 82878606f3c836b1be735efd255b0fb2dcae4367f63eaf183a3bf30185666be9b23c361d25b296ccae037377b1c63b3444ca0a790721e2c2a80f0c43be7cd0be
7
+ data.tar.gz: 461433464dfd4c7202c2b711257935a181326eea40c8f6561c18b2c531ecf2a99dc9ff787fccbab75d48910d62c5ffbc071e3de2c8b890c6a172340ea782b552
@@ -1,14 +1,14 @@
1
1
  module SelfAuthRails
2
2
  module ApplicationHelper
3
3
  def authenticate_user!
4
- current_url = request.base_url + request.path
4
+ current_url = URI(request.base_url + request.path).request_uri
5
5
 
6
6
  uri = URI(main_app.root_url)
7
7
 
8
- new_url = SelfAuthRails::Engine.routes.url_helpers.new_url(host: uri.host, port: uri.port)
9
- create_url = SelfAuthRails::Engine.routes.url_helpers.create_url(host: uri.host, port: uri.port)
10
- qr_url = SelfAuthRails::Engine.routes.url_helpers.qr_url(host: uri.host, port: uri.port)
11
- dl_url = SelfAuthRails::Engine.routes.url_helpers.dl_url(host: uri.host, port: uri.port)
8
+ new_url = URI(SelfAuthRails::Engine.routes.url_helpers.new_url(host: uri.host, port: uri.port)).request_uri
9
+ create_url = URI(SelfAuthRails::Engine.routes.url_helpers.create_url(host: uri.host, port: uri.port)).request_uri
10
+ qr_url = URI(SelfAuthRails::Engine.routes.url_helpers.qr_url(host: uri.host, port: uri.port)).request_uri
11
+ dl_url = URI(SelfAuthRails::Engine.routes.url_helpers.dl_url(host: uri.host, port: uri.port)).request_uri
12
12
 
13
13
  if [new_url, create_url, qr_url, dl_url].include? current_url
14
14
  redirect_to root_url unless current_user.nil?
@@ -1,3 +1,3 @@
1
1
  module SelfAuthRails
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: self-auth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrià Cidre
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-26 00:00:00.000000000 Z
11
+ date: 2022-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails