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/auth.js') 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