strongmind-auth 1.0.9 → 1.0.10

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: 306122e7c423973cd711bff6f4802a60e1970aa74b79482d8ac7cace0bb1fd95
4
- data.tar.gz: 28098227cf9ff1869bdee71dae13dbcdbb5f1d066861c63c75e3e63c749f4825
3
+ metadata.gz: f48f262a82aa122f2c2e02f24a80af05e8ddc16c47b03f74e2ae6cd1e75f7b02
4
+ data.tar.gz: 178b4506c5e76422842f944e74f4fb24e94785085be8a3fa62699a3d12d1b88c
5
5
  SHA512:
6
- metadata.gz: d0829abe155dc13d7422659d51c684bb4e47fde17b496af7ba19cc5dd40c44b8c3602a62a98aca86b2bb18d16efc0f1148478ca002e8a92efe842ee6fbdd56a6
7
- data.tar.gz: 4dd5f8659fde38e46a617afb817e9d350b231b3cb49c6f537af7563669e1ae671c22111fd9339b5bc57b7265a1ca8ce70aaa9541bdbbb2eb7e32bd5b7dd84476
6
+ metadata.gz: 0fc9d5270f0f4c4f94db091278e00b928c3ba566d1a6eaa0c400ca6aa5b2ed59cbe1bf3169d69ad22906394a9c0a9cfe9195d4e65069cb465db54321eb87edb0
7
+ data.tar.gz: 3e3a8968049708aa7cf9db09d2a08387c95c59b92a19f84bdeaf070319ea85e7c3b19eb46160cb6ecc6cfe0acb75d34d244ee451e6dd90afdc3786f054e8812f
@@ -22,7 +22,19 @@ module Users
22
22
  end
23
23
 
24
24
  def failure
25
- redirect_to root_url
25
+ client_errors = [
26
+ "#<AttrRequired::AttrMissing: 'identifier' required.>",
27
+ "#<Rack::OAuth2::Client::Error: invalid_client>",
28
+ ]
29
+ if client_errors.include?(request.env['omniauth.error'].inspect)
30
+ render
31
+ else
32
+ redirect_to root_path
33
+ end
34
+ end
35
+
36
+ def passthru
37
+ redirect_to root_path
26
38
  end
27
39
  end
28
40
 
@@ -0,0 +1,32 @@
1
+ Your StrongMind identity client does not appear to be configured correctly.
2
+ <br/>
3
+ Please follow these steps:
4
+ <br/>
5
+ <br/>
6
+ <%
7
+ app_name = Rails.application.class.name.split("::").first
8
+ app_url = ENV['APP_BASE_URL']
9
+ stage_url = "https://devlogin.strongmind.com/Clients/Create?ClientID=#{app_name}&RedirectURL=#{app_url}/users/auth/strongmind/callback"
10
+ prod_url = "https://login.strongmind.com/Clients/Create?ClientID=#{app_name}&RedirectURL=#{app_url}/users/auth/strongmind/callback"
11
+ %>
12
+
13
+ <ol style="list-style: decimal">
14
+ <li>
15
+ <%= link_to "Create Client in Staging Identity Server", stage_url %>
16
+ </li>
17
+ <li>
18
+ <%= link_to "Create Client in Production Identity Server", prod_url %>
19
+ </li>
20
+ <li>
21
+ Set the following environment variables in your .env file:
22
+ <br/>
23
+ <br/>
24
+ <pre>
25
+ IDENTITY_CLIENT_ID=<%= app_name %><br/>IDENTITY_CLIENT_SECRET={use the secret you generated for the client}
26
+ </pre>
27
+
28
+ </li>
29
+ <li>
30
+ Restart your server.
31
+ </li>
32
+ </ol>
@@ -1,5 +1,5 @@
1
1
  module Strongmind
2
2
  module Auth
3
- VERSION = "1.0.9"
3
+ VERSION = "1.0.10"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Team Belding
@@ -114,6 +114,7 @@ files:
114
114
  - app/models/user_base.rb
115
115
  - app/views/layouts/_loading_navbar.html.erb
116
116
  - app/views/logins/index.html.erb
117
+ - app/views/users/omniauth_callbacks/failure.html.erb
117
118
  - config/initializers/devise.rb
118
119
  - config/routes.rb
119
120
  - lib/generators/strongmind/USAGE