phcdevworks_accounts_auth0 0.8.0 → 0.11.0

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: 9c151b10dbb42072be60321c048186a18225e2d74d434d3d5fa6b75e38c2a0d3
4
- data.tar.gz: e7ad04beadc01c765159e1523afab6144c7f7bb86508c2b3eaaeadc3e41ba48a
3
+ metadata.gz: b128afc84434f1de090ca21858a1a791acb8edeedf8bcb227cefcbe3fe9ae6be
4
+ data.tar.gz: 7bdef29da14f91677044cd41c4dfa7e325b91b3ab3c3f9e693bdee455eea698e
5
5
  SHA512:
6
- metadata.gz: 7fa708238779193a47056ba4640fd7b44349b1ab2c6c80378faeaf8346b9eb3f3048e39091f79f500466ffe86670f3474eafad9f7881aab63308e434a084baf1
7
- data.tar.gz: f0ce58b262719a49fc43889d15e14013ceff97db4b5000cb609d855d86e355d76bdb5b9e17be8355c0c4969f600fcc5fcdc6d0cad267ae7d9c5175a31eb124a3
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['omniauth.auth']
6
- session[:userinfo] = auth_info['extra']['raw_info']
7
- redirect_to '/user'
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['message']
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: root_url,
26
- client_id: AUTH0_CONFIG['auth0_client_id']
25
+ returnTo: auth_logged_out_path,
26
+ client_id: AUTH0_CONFIG["auth0_client_id"]
27
27
  }
28
- URI::HTTPS.build(host: AUTH0_CONFIG['auth0_domain'], path: '/v2/logout', query: to_query(request_params)).to_s
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
@@ -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 %>
@@ -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 'phcdevworks_accounts_devise/admin/pages/components/profile_header' %>
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>
@@ -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/auth0/callback',
9
+ callback_path: '/auth/callback',
10
10
  authorize_params: {
11
11
  scope: 'openid profile'
12
12
  }
data/config/routes.rb CHANGED
@@ -9,5 +9,6 @@ PhcdevworksAccountsAuth0::Engine.routes.draw do
9
9
  get "/auth/failure" => "auth/handler#failure"
10
10
  get "/auth/logout" => "auth/handler#logout"
11
11
  get "/auth/redirect" => "auth/handler#redirect"
12
+ get "/auth/logged_out"
12
13
 
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksAccountsAuth0
2
- VERSION = "0.8.0"
2
+ VERSION = "0.11.0"
3
3
  end
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.8.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-10 00:00:00.000000000 Z
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