Skip to content

Unable to fail-over to secondary auth strategy when cookie is invalid #163

@dpmott

Description

@dpmott

Per the Hapi docs:
https://hapijs.com/api#serverauthschemename-scheme

I should be able to provide Boom.unauthorized(null, 'Custom') to the callback of the validateFunc to cause Hapi to try the next auth strategy.

Unfortunately, hapi-auth-cookie ignores the 'err' parameter of the callback and forms its own Boom.unauthorized(), so there's no way to make this happen without code changes.

Standby, I'll submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions