Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid cookie value" after password change, but OK after refresh! #65

Closed
gttotev opened this issue Dec 20, 2014 · 5 comments
Closed

"Invalid cookie value" after password change, but OK after refresh! #65

gttotev opened this issue Dec 20, 2014 · 5 comments
Assignees
Milestone

Comments

@gttotev
Copy link

@gttotev gttotev commented Dec 20, 2014

After changing the authenticated cookie password, restarting the app results in a {"statusCode":400,"error":"Bad Request","message":"Invalid cookie value"} response from the server. But after a refresh of the page, the proper page displays instead of the 400. I have set clearInvalid to true inside the cookieOptions as shown below:

server.register({
    register: require('yar'),
    options: {
        cookieOptions: {
            password: 'pass',
            clearInvalid: true,
            isSecure: false
        }
    }
}, function (err) {});

I am using Hapi version 8.0.0 and yar version 3.0.3

@OmniJeff OmniJeff self-assigned this Dec 21, 2014
@hueniverse hueniverse added the bug label Jan 5, 2015
@ankitpatial

This comment has been minimized.

Copy link

@ankitpatial ankitpatial commented Feb 2, 2015

+1

@ankitpatial

This comment has been minimized.

Copy link

@ankitpatial ankitpatial commented Feb 2, 2015

no use of refresh, needs to clear cache to make it work.

@gttotev

This comment has been minimized.

Copy link
Author

@gttotev gttotev commented Feb 2, 2015

Clearing the cache also makes it works...

@gkatsev

This comment has been minimized.

Copy link

@gkatsev gkatsev commented Feb 10, 2015

I'm seeing the same issue. It wouldn't work initially at all but after adding 'clearInvalid', it would work like in the main issue.

@mark-bradshaw

This comment has been minimized.

Copy link
Contributor

@mark-bradshaw mark-bradshaw commented Sep 9, 2015

Fixed with #80, and released as v4.0.0.

@mark-bradshaw mark-bradshaw modified the milestones: 3.0.5, 4.0.0 Sep 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.