From 1d17ece2be61c00d253f0babaf85975558a446ec Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Mon, 9 Aug 2021 13:39:17 +0200 Subject: [PATCH] fix: working auth conf --- nginx/site.conf | 3 +-- src/hooks/useAuth.ts | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nginx/site.conf b/nginx/site.conf index 07923aab..e6d27c77 100644 --- a/nginx/site.conf +++ b/nginx/site.conf @@ -13,7 +13,6 @@ server { } location /api { proxy_pass https://backend:1443/api; - } location /OAuth2Login { proxy_pass https://backend:1443/OAuth2Login; @@ -21,7 +20,7 @@ server { location /OAuth2Callback { proxy_pass https://backend:1443/OAuth2Callback; } - location /Logout { + location /Logout { proxy_pass https://backend:1443/Logout; } } diff --git a/src/hooks/useAuth.ts b/src/hooks/useAuth.ts index f1607e4b..7071eae3 100644 --- a/src/hooks/useAuth.ts +++ b/src/hooks/useAuth.ts @@ -18,7 +18,9 @@ export const useAuth = (): Auth => { //login user const loginUser = async (): Promise<void> => { try { - await axios.get(`${_apiUrl}OAuth2Login`, { withCredentials: true }) + const tmp = await axios.get(`${_apiUrl}OAuth2Login`, { withCredentials: true }) + console.log('lAAAAAA') + console.log(tmp) await setUserContext() } catch (e) { setError(e) -- GitLab