From 01e86fb4a54b801a9b8124455611c312e5de4af0 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Mon, 14 Aug 2023 15:04:45 +0700 Subject: google sign in --- src/core/utils/auth.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/utils') diff --git a/src/core/utils/auth.js b/src/core/utils/auth.js index cddff2b8..03b20ae2 100644 --- a/src/core/utils/auth.js +++ b/src/core/utils/auth.js @@ -1,4 +1,5 @@ import { deleteCookie, getCookie, setCookie } from 'cookies-next' +import { signOut } from 'next-auth/react' /** * Retrieves authentication data from cookie and returns it as an object. @@ -27,7 +28,8 @@ const setAuth = (user) => { * * @returns {boolean} - Returns `true`. */ -const deleteAuth = () => { +const deleteAuth = async() => { + await signOut() deleteCookie('auth') return true } -- cgit v1.2.3 From 7322c0ad2e8764c7c1e6100c93690d24cd4ab947 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Fri, 1 Sep 2023 13:53:42 +0700 Subject: comment sign out google --- src/core/utils/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/utils') diff --git a/src/core/utils/auth.js b/src/core/utils/auth.js index 03b20ae2..a7244747 100644 --- a/src/core/utils/auth.js +++ b/src/core/utils/auth.js @@ -29,7 +29,7 @@ const setAuth = (user) => { * @returns {boolean} - Returns `true`. */ const deleteAuth = async() => { - await signOut() + // await signOut() deleteCookie('auth') return true } -- cgit v1.2.3