Hi,
I have a scenario whereby I have a consumer api and a merchant api. These APIs use different cookies - one called 'merchant' and one called 'consumer'.
I notice from the documentation that the cookie-auth 'scheme' cannot be registered more than once (due to request decoration). Does this therefore imply that I can't set up two strategies (using server.auth.strategy(...)), one for consumer and one for merchant, and use:
auth: {
strategy: 'merchant' // or consumer
}
to validate authentication on different routes?
The reason I ask is that since registering the consumer strategy, it seems that my merchant login endpoint is returning a cookie named after the consumer strategy, even though the route auth configuration is correct.
If so - is there a way around this with some code changes to the module? Or would it require a significant rework?
Thanks in advance,
Antony
Hi,
I have a scenario whereby I have a consumer api and a merchant api. These APIs use different cookies - one called 'merchant' and one called 'consumer'.
I notice from the documentation that the cookie-auth 'scheme' cannot be registered more than once (due to request decoration). Does this therefore imply that I can't set up two strategies (using
server.auth.strategy(...)), one for consumer and one for merchant, and use:to validate authentication on different routes?
The reason I ask is that since registering the consumer strategy, it seems that my merchant login endpoint is returning a cookie named after the consumer strategy, even though the route auth configuration is correct.
If so - is there a way around this with some code changes to the module? Or would it require a significant rework?
Thanks in advance,
Antony