phcdevworks_accounts_auth0 0.8.0 → 0.11.0
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 +4 -4
- data/app/controllers/phcdevworks_accounts_auth0/auth/handler_controller.rb +9 -9
- data/app/views/layouts/phcdevworks_accounts_auth0/components/backend/navigation/_top_menu.html.erb +0 -3
- data/app/views/layouts/phcdevworks_accounts_auth0/components/backend/sidebars/_side_menu.html.erb +0 -4
- data/app/views/phcdevworks_accounts_auth0/admin/pages/user_profile.html.erb +1 -1
- data/app/views/phcdevworks_accounts_auth0/auth/handler/failure.html.erb +1 -0
- data/app/views/phcdevworks_accounts_auth0/auth/handler/logged_out.html.erb +0 -0
- data/config/initializers/auth0.rb +1 -1
- data/config/routes.rb +1 -0
- data/lib/phcdevworks_accounts_auth0/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b128afc84434f1de090ca21858a1a791acb8edeedf8bcb227cefcbe3fe9ae6be
|
4
|
+
data.tar.gz: 7bdef29da14f91677044cd41c4dfa7e325b91b3ab3c3f9e693bdee455eea698e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46aea8fac1cdda312446bd172e4340b1531aa3ce54c6a9ec8b72dff917ce35cafbbe995a9089f66f1a3ed8f05413c780f2a8036e5a0179a6b9fcae86792319c0
|
7
|
+
data.tar.gz: df182def527d84fe59791de5dfaba450f8438afc9097b4384f424906ce0f5427edda93cb48d41514159c2c87cdd3bef14e5c392aeae0666e6fc621c49b488959
|
@@ -2,18 +2,18 @@ module PhcdevworksAccountsAuth0
|
|
2
2
|
class Auth::HandlerController < ApplicationController
|
3
3
|
|
4
4
|
def callback
|
5
|
-
auth_info = request.env[
|
6
|
-
session[:userinfo] = auth_info[
|
7
|
-
redirect_to
|
5
|
+
auth_info = request.env["omniauth.auth"]
|
6
|
+
session[:userinfo] = auth_info["extra"]["raw_info"]
|
7
|
+
redirect_to "/"
|
8
8
|
end
|
9
9
|
|
10
10
|
def failure
|
11
|
-
@error_msg = request.params[
|
11
|
+
@error_msg = request.params["message"]
|
12
12
|
end
|
13
13
|
|
14
14
|
def logout
|
15
15
|
reset_session
|
16
|
-
redirect_to logout_url
|
16
|
+
redirect_to logout_url, allow_other_host: true
|
17
17
|
end
|
18
18
|
|
19
19
|
private
|
@@ -22,14 +22,14 @@ module PhcdevworksAccountsAuth0
|
|
22
22
|
|
23
23
|
def logout_url
|
24
24
|
request_params = {
|
25
|
-
returnTo:
|
26
|
-
client_id: AUTH0_CONFIG[
|
25
|
+
returnTo: auth_logged_out_path,
|
26
|
+
client_id: AUTH0_CONFIG["auth0_client_id"]
|
27
27
|
}
|
28
|
-
URI::HTTPS.build(host: AUTH0_CONFIG[
|
28
|
+
URI::HTTPS.build(host: AUTH0_CONFIG["auth0_domain"], path: "/v2/logout", query: to_query(request_params)).to_s
|
29
29
|
end
|
30
30
|
|
31
31
|
def to_query(hash)
|
32
|
-
hash.map { |k, v| "#{k}=#{CGI.escape(v)}" unless v.nil? }.reject(&:nil?).join(
|
32
|
+
hash.map { |k, v| "#{k}=#{CGI.escape(v)}" unless v.nil? }.reject(&:nil?).join("&")
|
33
33
|
end
|
34
34
|
|
35
35
|
end
|
data/app/views/layouts/phcdevworks_accounts_auth0/components/backend/navigation/_top_menu.html.erb
CHANGED
@@ -26,9 +26,6 @@
|
|
26
26
|
</span>
|
27
27
|
</a>
|
28
28
|
<div class="dropdown-menu dropdown-menu-end me-1">
|
29
|
-
<%= link_to phcdevworks_accounts_auth0.user_profile_path, class: "dropdown-item" do %>
|
30
|
-
<i class="fad fa-cogs"></i> Account Settings
|
31
|
-
<% end %>
|
32
29
|
<%= link_to phcdevworks_accounts_auth0.auth_logout_path, class: "dropdown-item" do %>
|
33
30
|
<i class="fad fa-sign-out-alt"></i> Logout
|
34
31
|
<% end %>
|
data/app/views/layouts/phcdevworks_accounts_auth0/components/backend/sidebars/_side_menu.html.erb
CHANGED
@@ -44,10 +44,6 @@
|
|
44
44
|
<!-- -PHCDEV- Page Container - Sidebar - Profile - Menu -->
|
45
45
|
<div id="appSidebarProfileMenu" class="collapse">
|
46
46
|
<div class="menu-item pt-5px">
|
47
|
-
<%= link_to phcdevworks_accounts_auth0.user_profile_path, class: "menu-link" do %>
|
48
|
-
<div class="menu-icon"><i class="fad fa-cogs"></i></div>
|
49
|
-
<div class="menu-text">Account Settings</div>
|
50
|
-
<% end %>
|
51
47
|
<%= link_to phcdevworks_accounts_auth0.auth_logout_path, class: "menu-link" do %>
|
52
48
|
<div class="menu-icon"><i class="fad fa-sign-out-alt"></i></div>
|
53
49
|
<div class="menu-text">Logout</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<!-- User Profiles - Header -->
|
9
9
|
<div class="profile">
|
10
|
-
<%= render '
|
10
|
+
<%= render 'phcdevworks_accounts_auth0/admin/pages/components/profile_header' %>
|
11
11
|
</div>
|
12
12
|
<!-- User Profiles - Header -->
|
13
13
|
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>You Are Logged Out</h1>
|
File without changes
|
@@ -6,7 +6,7 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|
6
6
|
AUTH0_CONFIG['auth0_client_id'],
|
7
7
|
AUTH0_CONFIG['auth0_client_secret'],
|
8
8
|
AUTH0_CONFIG['auth0_domain'],
|
9
|
-
callback_path: '/auth/
|
9
|
+
callback_path: '/auth/callback',
|
10
10
|
authorize_params: {
|
11
11
|
scope: 'openid profile'
|
12
12
|
}
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phcdevworks_accounts_auth0
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PHCDevworks
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-09-
|
12
|
+
date: 2022-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -349,6 +349,7 @@ files:
|
|
349
349
|
- app/views/phcdevworks_accounts_auth0/admin/pages/user_profile.html.erb
|
350
350
|
- app/views/phcdevworks_accounts_auth0/admin/pages/users_list.html.erb
|
351
351
|
- app/views/phcdevworks_accounts_auth0/auth/handler/failure.html.erb
|
352
|
+
- app/views/phcdevworks_accounts_auth0/auth/handler/logged_out.html.erb
|
352
353
|
- app/views/phcdevworks_accounts_auth0/user/pages/dashboard.html.erb
|
353
354
|
- app/views/phcdevworks_accounts_auth0/user/pages/profile.html.erb
|
354
355
|
- config/initializers/auth0.rb
|