From 02af50c3f25377ca6ceffcfd330996a263f283fa Mon Sep 17 00:00:00 2001 From: Jerod Fritz Date: Wed, 13 Oct 2021 11:58:09 -0400 Subject: [PATCH] make onLogout signature similar to onLogin by accepting cookieAttributes as parameter --- lib/templates/plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/templates/plugin.js b/lib/templates/plugin.js index 17a39d80..de507333 100644 --- a/lib/templates/plugin.js +++ b/lib/templates/plugin.js @@ -145,8 +145,8 @@ export default (ctx, inject) => { } } }, - onLogout: async (apolloClient = apolloProvider.defaultClient, skipResetStore = false) => { - cookies.remove(AUTH_TOKEN_NAME, COOKIE_ATTRIBUTES) + onLogout: async (apolloClient = apolloProvider.defaultClient, cookieAttributes = COOKIE_ATTRIBUTES, skipResetStore = false) => { + cookies.remove(AUTH_TOKEN_NAME, cookieAttributes); if (apolloClient.wsClient) restartWebsockets(apolloClient.wsClient) if (!skipResetStore) { try {