diff options
| author | Adam Soltys <[email protected]> | 2022-11-02 19:47:29 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-02 19:48:18 -0700 |
| commit | 23ffc5a6359dbc84a1de1da632412edeb9989b5f (patch) | |
| tree | 1cc276efeb5287e1fc176ec60d46aed091ab08ca /src/routes/(app)/logout/+page.server.js | |
| parent | c12857a38eed1227ed51dc6e0af7242e66dd7561 (diff) | |
| download | coinos-ui-23ffc5a6359dbc84a1de1da632412edeb9989b5f.tar.gz coinos-ui-23ffc5a6359dbc84a1de1da632412edeb9989b5f.zip | |
move to app layout
Diffstat (limited to 'src/routes/(app)/logout/+page.server.js')
| -rw-r--r-- | src/routes/(app)/logout/+page.server.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/routes/(app)/logout/+page.server.js b/src/routes/(app)/logout/+page.server.js new file mode 100644 index 00000000..1b4a1dc1 --- /dev/null +++ b/src/routes/(app)/logout/+page.server.js @@ -0,0 +1,12 @@ +import { redirect } from '@sveltejs/kit'; + +const opts = { + expires: new Date(0), + path: '/' +}; + +export async function load({ cookies }) { + cookies.set('token', '', opts); + cookies.set('refresh_token', '', opts); + throw redirect(307, '/'); +} |
