summaryrefslogtreecommitdiff
path: root/src/core/utils/auth.js
diff options
context:
space:
mode:
authortrisusilo <tri.susilo@altama.co.id>2023-09-01 02:34:28 +0000
committertrisusilo <tri.susilo@altama.co.id>2023-09-01 02:34:28 +0000
commitda727c41d5221e13389005dbdff2706d3eb42842 (patch)
tree2abb9a8090306791a76069baff6c91c5e151d3b5 /src/core/utils/auth.js
parent7356bcc0d1b7bac8d05ac315fdcf2a46b3996e91 (diff)
parentdfdeedf7141c9191952bdb3005e2e91d2a495044 (diff)
Merged in Feature/google_sign_up (pull request #56)
Feature/google sign up
Diffstat (limited to 'src/core/utils/auth.js')
-rw-r--r--src/core/utils/auth.js4
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
}