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 {