phcdevworks_accounts_auth0 0.7.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/phcdevworks_accounts_auth0/auth/handler_controller.rb +8 -8
- 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/config/initializers/auth0.rb +1 -1
- data/config/routes.rb +2 -2
- data/lib/phcdevworks_accounts_auth0/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b656ee15f92dca0a43a0ce0e921a61e31a72b2fe5e9fa094f052d0ebcdaada3
|
4
|
+
data.tar.gz: 2d6b7836d297a21f3b65ab2e85e423aad3da7c80d434987ed0d3af66d98c3be0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 283b9f5e73c8cba33500f0f17d9ae80dc93fab8b77b75d4fadd8a8c77c63094ad921fc0044cd56ddd3dc797dafd29953af13ad767145147c95ea280f4c43b066
|
7
|
+
data.tar.gz: 6dcc1f8921984e28374f8f4c6fed2b7936a03249f5d1c1296582114d2778e27c36b4faf07ba7806b5597b1e6ab54456e7fd8f1636e0d0d8adedb58e42174b45b
|
@@ -2,13 +2,13 @@ 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
|
@@ -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: main_app.root_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
|
|
@@ -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
@@ -1,8 +1,8 @@
|
|
1
1
|
PhcdevworksAccountsAuth0::Engine.routes.draw do
|
2
2
|
|
3
3
|
# User Dashboard
|
4
|
-
get "dashboard" => 'user/pages#dashboard'
|
5
|
-
get "profile" => 'user/pages#profile'
|
4
|
+
get "user/dashboard" => 'user/pages#dashboard'
|
5
|
+
get "user/profile" => 'user/pages#profile'
|
6
6
|
|
7
7
|
# Auth Routes
|
8
8
|
get "/auth/callback" => "auth/handler#callback"
|
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.10.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
|