rails_simple_auth 1.0.7 → 1.0.9

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: a168e835a568c68794da8d69b24fe33d8a99ece8e14277e3676668ae62d0d284
4
- data.tar.gz: e8d4947a07f36d2f9f9a45ed0d8b98966adb8e1d4084657da00ee7050393c56b
3
+ metadata.gz: c5f9d9b599e334e5a35ceb95fe2bc733593b9329e07d42c06bd306d549280567
4
+ data.tar.gz: bf8c69961e726a34e0caea4ad1b1d5049d942a7c6f694a2612c198ab8c795d09
5
5
  SHA512:
6
- metadata.gz: bc07416640d3ae37febfce98d74ab212b35469ff29145441cb1ed0c260e7ac4e0eafa3d2edbc870fb46d30c847d9669ce5be6b4135ba677bb4fafe5855c44b31
7
- data.tar.gz: 0d5ce6bddec0962b6f4d065cc72b9b88772c25326bbfcefc0dc28b3b61739419ea12ed0538ab59be8b18da233054fc2a8d87625959f77e571a54d7dd27834e59
6
+ metadata.gz: bb0a48a70365bdbcb733eae1e20126f35c58f8de4cd8458dade299f6f191d819f53acb88da8f3b163447ec2abe5b7efca9e0a5c52a9e85d49863fff0eb4bb36a
7
+ data.tar.gz: 0d71c70b2daf1e7ae474fe86e17950941a150eecfbddfa838a2fe7110b4e860cf33487b43b7268ca096f4aad00f50f351cfbeab4ac3aa486d08d06f099caad87
data/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.0.9] - 2026-01-19
11
+
12
+ ### Added
13
+
14
+ - **OAuth failure logging** - Logs error type, strategy, and error message when OAuth fails to help debug authentication issues
15
+
16
+ ## [1.0.8] - 2026-01-19
17
+
18
+ ### Fixed
19
+
20
+ - **OAuth buttons use button_to instead of link_to** - `link_to` with `method: :post` doesn't work in Rails 8 without rails-ujs. Changed OAuth buttons in sessions and registrations views to use `button_to` which properly creates POST forms.
21
+
10
22
  ## [1.0.7] - 2026-01-19
11
23
 
12
24
  ### Fixed
@@ -28,6 +28,17 @@ module RailsSimpleAuth
28
28
  end
29
29
 
30
30
  def failure
31
+ error = request.env['omniauth.error']
32
+ error_type = request.env['omniauth.error.type']
33
+ strategy = request.env['omniauth.error.strategy']&.name
34
+
35
+ Rails.logger.error(
36
+ "[RailsSimpleAuth] OAuth failure: " \
37
+ "type=#{error_type.inspect}, " \
38
+ "strategy=#{strategy.inspect}, " \
39
+ "error=#{error&.message.inspect}"
40
+ )
41
+
31
42
  redirect_to new_session_path, alert: 'Authentication failed. Please try again.'
32
43
  end
33
44
  end
@@ -36,9 +36,8 @@
36
36
  <div class="rsa-auth-form__oauth">
37
37
  <div class="rsa-auth-form__oauth-buttons">
38
38
  <% RailsSimpleAuth.configuration.oauth_providers.each do |provider| %>
39
- <%= link_to "/auth/#{provider}",
39
+ <%= button_to "/auth/#{provider}",
40
40
  class: "rsa-auth-form__oauth-button rsa-auth-form__oauth-button--#{provider}",
41
- method: :post,
42
41
  data: { turbo: false } do %>
43
42
  <span class="rsa-auth-form__oauth-icon rsa-auth-form__oauth-icon--<%= provider %>"></span>
44
43
  Continue with <%= provider.to_s.titleize %>
@@ -39,9 +39,8 @@
39
39
  <div class="rsa-auth-form__oauth">
40
40
  <div class="rsa-auth-form__oauth-buttons">
41
41
  <% RailsSimpleAuth.configuration.oauth_providers.each do |provider| %>
42
- <%= link_to "/auth/#{provider}",
42
+ <%= button_to "/auth/#{provider}",
43
43
  class: "rsa-auth-form__oauth-button rsa-auth-form__oauth-button--#{provider}",
44
- method: :post,
45
44
  data: { turbo: false } do %>
46
45
  <span class="rsa-auth-form__oauth-icon rsa-auth-form__oauth-icon--<%= provider %>"></span>
47
46
  Continue with <%= provider.to_s.titleize %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsSimpleAuth
4
- VERSION = '1.0.7'
4
+ VERSION = '1.0.9'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_simple_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuznetsov