self-auth-rails 0.1.3 → 0.1.5

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: 8f810144382bd25fa0222496cef327c9173e64be241d92936bc48081974e8e05
4
- data.tar.gz: 0efab5872279cfc516d50cdc4d6bc840a97c60262b4e35c7d37c81ee12cb75e1
3
+ metadata.gz: 6d2821efde567ddb20996786b4d43f8b01cd9dc241d5776e39368d8683a3c722
4
+ data.tar.gz: 8803329056d4c9a9fbcb33840db6c1ff8c1a4b68957dee004793e6ce269e9b67
5
5
  SHA512:
6
- metadata.gz: 9c1050ec2e42551cd0c627e25d6aac96e5d69996c422249f781604ee28b7c89f1cda292df733fd66f19bb8755453cd3a57f275a40d183d8b6febcc1fbb6f540f
7
- data.tar.gz: bed299ce81b58f2a1135a97e04db73de7d29c37c0516a19746dfd909cc3830c13c5b32028526c75f988fc56225dbfef1d694444582eca3de5c000ce1419b4418
6
+ metadata.gz: 3f7a3cbcac197ccaaa7ca1602ef12ddf0ecf58cac7aecf0c8dc4aac436bff560cb9cfe25671582f4803a733cca2643159b345f6883d0253fd73646180eaac585
7
+ data.tar.gz: 00cc3778c63135789fd2b156151c5df62a219212711aaca2547204e67273acdf8b4c003340fea1e949c76f50a21a281f7978a1838949ac704daccb06238b7c4e
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # self-auth-rails
1
+ # Self Auth Rails Engine
2
+
3
+ [![CI](https://github.com/joinself/self-auth-rails-engine/actions/workflows/ci.yml/badge.svg)](https://github.com/joinself/self-auth-rails-engine/actions/workflows/ci.yml)
2
4
 
3
5
  self-auth-rails is rails engine to easily integrate [Self Authentication](https://docs.joinself.com/authentication/) on your authentication workflow.
4
6
 
@@ -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.5"
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.5
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: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails