Skip to content

After upgrading from 9.1.0 to 10.0.0 on hapi 18.1.0 getting strange behaviour for plugin #211

@CloudVector

Description

@CloudVector

Error: Missing authentication
at module.exports.internals.Auth._authenticate (C:\unicomp\session\node_modules\hapi\lib\auth.js:270:26)
at process._tickCallback (internal/process/next_tick.js:68:7)

I have a route which using the strategy "session", but I can get to the route where auth is not valid and the validationFunc NEVER got called.

Debugging the code, after the

request.cookieAuth.set({ 'sid': sid });

where I set the session (and actually just a random cookie as well)

h.state('abc', '123');

Then I redirect to another url where I would expect to see both cookies, but NOTHING. No cookie set at all. I tried h.redirect('/new-url') and inject into a page which get redirected from the client side (javascript). Both cases the endpoint receiving the call does not have ANY COOKIE SET. I am baffled, what am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    non issueIssue is not a problem or requires changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions