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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df93af515a4dd9baede0c6dc6aadaacd6dc9a15d56549cc83fb5faff52099277
4
- data.tar.gz: a844b48571fd4e31bf53f017fbc659971315900f5e6db4ec10ebe21e8f745857
3
+ metadata.gz: 8b656ee15f92dca0a43a0ce0e921a61e31a72b2fe5e9fa094f052d0ebcdaada3
4
+ data.tar.gz: 2d6b7836d297a21f3b65ab2e85e423aad3da7c80d434987ed0d3af66d98c3be0
5
5
  SHA512:
6
- metadata.gz: e88cff2b6b2ffd8af33c175870fd47ea92e3f1fc8b64081069e9d8f8f36e928be508d1886ed536365e13aadf323f638f59904df868a35f845a63d7613e61ef94
7
- data.tar.gz: 643aaf0ea4077e228028e98ff5eacad5305a24c67d7a0aa075ec1c1096e3f382bc3e6b308ff957f68ca12c43e8084f41c240c738dda4d8283edd6725207cc059
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['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
@@ -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: main_app.root_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
 
@@ -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
@@ -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"
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksAccountsAuth0
2
- VERSION = "0.7.0"
2
+ VERSION = "0.10.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.7.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-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