diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-08-14 15:04:45 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-08-14 15:04:45 +0700 |
| commit | 01e86fb4a54b801a9b8124455611c312e5de4af0 (patch) | |
| tree | 09733a6f9fff4c8624bd4a2f2c514d8b16cc684b /src/core/utils/auth.js | |
| parent | 4cfe9157d64a76bf9913fe599d908497a18f5316 (diff) | |
google sign in
Diffstat (limited to 'src/core/utils/auth.js')
| -rw-r--r-- | src/core/utils/auth.js | 4 |
1 files changed, 3 insertions, 1 deletions
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 } |
