How to chain multiple jwt auth strategies
See original GitHub issueThis isnāt an issue per se, but Iām struggling like mad to find a solution. I have two types of clients that each have their own signing key. I need to try two jwt strategies in a row; if either of them match, the client should be authenticated.
However, this is not how Hapiās auth system works. If the first strategy fails to decode the token, it stops the chain and the second strategy is never called. I looked at #120 and #130 as they seemed similar, but I wasnāt able to find a way to use verifyFunc
to achieve the desired behavior.
Basically, I need the first strategy to act like ātryā and the second act like ārequiredā but I canāt figure out how to achieve this. Any ideas would be most appreciated! Sorry if this isnāt exactly the right forum for the question, but seems someone must have encountered this use case beforeā¦
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
@Jiropole Started looking for similar solution today so youāve already helped at least one person. Thanks š
Sorry, this versionās easier on the eyes: