phcdevworks_accounts_auth0 1.1.4b → 1.1.5b
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4e9a73f87b1cb4e1981bc2ad11c4101aea7bca5039ae5957c89d89678edbc81
|
|
4
|
+
data.tar.gz: b7a81f30bd8597040500e9c91b0f3bd1ebdbf6ad3963ad3c28535dba3036abd1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5b58cf2fbf9bad93db4014288c7b9b8cb06ef05dd8cb4bbcbc66b587d227741f1e67dead46fdd4390b1a9883da98b377d4bd44b0b2f0fb7f733f43d1e8b67dfa
|
|
7
|
+
data.tar.gz: 06c7e81e60b20d197810b992b4fe50a588b3b314b66c5480c55550559c2fc5654478005199d4becf32d4dcc3f61219862da78382927eadb4885c884f4251a6a1
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
class Auth::HandlerController < ApplicationController
|
|
3
3
|
|
|
4
4
|
def callback
|
|
5
|
-
|
|
5
|
+
info = request.env['omniauth.auth']
|
|
6
|
+
session[:user_info] = info['extra']['raw_info']
|
|
6
7
|
redirect_to main_app.root_path
|
|
7
8
|
end
|
|
8
9
|
|
|
9
10
|
def failure
|
|
10
|
-
@error_msg = request.params[
|
|
11
|
+
@error_msg = request.params["message"]
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
def logout
|
|
@@ -22,9 +23,9 @@
|
|
|
22
23
|
def logout_url
|
|
23
24
|
request_params = {
|
|
24
25
|
returnTo: root_url,
|
|
25
|
-
client_id: Rails.application.config.auth0[
|
|
26
|
+
client_id: Rails.application.config.auth0["auth0_client_id"]
|
|
26
27
|
}
|
|
27
|
-
URI::HTTPS.build(host: AUTH0_CONFIG[
|
|
28
|
+
URI::HTTPS.build(host: AUTH0_CONFIG["auth0_domain"], path: "/v2/logout", query: request_params.to_query).to_s
|
|
28
29
|
end
|
|
29
30
|
|
|
30
31
|
def to_query(hash)
|
|
@@ -3,12 +3,12 @@ Rails.application.config.auth0 = Rails.application.config_for(:auth0)
|
|
|
3
3
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
|
4
4
|
provider(
|
|
5
5
|
:auth0,
|
|
6
|
-
Rails.application.config.auth0[
|
|
7
|
-
Rails.application.config.auth0[
|
|
8
|
-
Rails.application.config.auth0[
|
|
9
|
-
callback_path:
|
|
6
|
+
Rails.application.config.auth0["auth0_client_id"],
|
|
7
|
+
Rails.application.config.auth0["auth0_client_secret"],
|
|
8
|
+
Rails.application.config.auth0["auth0_domain"],
|
|
9
|
+
callback_path: "/auth/callback",
|
|
10
10
|
authorize_params: {
|
|
11
|
-
scope:
|
|
11
|
+
scope: "openid profile"
|
|
12
12
|
}
|
|
13
13
|
)
|
|
14
14
|
end
|