add cookie path property (#8594)
played around with that example and was wondering why it didn't work any more when having an `auth/login` page. I hope this addition will spare someone else some confusion :)
This commit is contained in:
parent
4a1215b701
commit
83a10eefee
1 changed files with 2 additions and 1 deletions
|
@ -24,7 +24,8 @@ const RegisterBox = () => {
|
|||
const onCompleted = data => {
|
||||
// Store the token in cookie
|
||||
document.cookie = cookie.serialize('token', data.signinUser.token, {
|
||||
maxAge: 30 * 24 * 60 * 60 // 30 days
|
||||
maxAge: 30 * 24 * 60 * 60, // 30 days
|
||||
path: '/' // make cookie available for all routes underneath "/"
|
||||
})
|
||||
// Force a reload of all the current queries now that the user is
|
||||
// logged in
|
||||
|
|
Loading…
Reference in a new issue