diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-08-18 04:00:24 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-08-18 04:00:24 +0000 |
| commit | 395d4868ff32e9db97ae467a28660f719da1e653 (patch) | |
| tree | 81e38caaee094ea6e3f1474b1d9174f3837f56dc /src/core/utils | |
| parent | 109019a3b75507700b2db56ce9a136151dd778cf (diff) | |
| parent | b6f6bf23f90ff0dfadf9bf0af8866c2cfc17aa9c (diff) | |
Merged in Feature/google_sign_up (pull request #48)
Feature/google sign up
Diffstat (limited to 'src/core/utils')
| -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 } |
