-
Notifications
You must be signed in to change notification settings - Fork 0
Description
To Reproduce
Step by step instructions to reproduce the behavior:
- Install passport-auth0 and to use with this package.
- Attempt to authenticate a user by navigating to
/auth/auth0/login.- Get a JS error, "callback is not a function" when the
verifyfunction is executed.
Expected behavior
Compatibility with passport-auth0, out-of-the-box or via configuration to get around any unexpected blockers.
Describe the bug
It seems that the package is not compatible with passport-auth0. Auth0 is the identity provider our team is required to use, and it seems like their
verifyfunction has a different number of arguments, for the purpose of "ID token validation." You can see their code here: https://github.com/auth0/passport-auth0/blob/master/lib/verifyWrapper.js#L15
Notice that the
verifyWrappertakes 5-6 arguments, depending on configuration, while theverifyfunction in this package is expecting 4-5 (reference: https://github.com/apostrophecms/passport-bridge/blob/main/index.js#L167). The difference here is that passport-auth0 has anextraParamsparameter, which seems to map to the decoded JWT for the use of ID token validation.
Details
Version of Apostrophe
@apostrophecms-pro/multisite v3.9.4
Version of Node.js:
Node.js v16.16.0
Server Operating System:
macOS 12.5.1
Additional context:
passport-auth0 is not the "official" Node.js plugin for auth0 anymore, but it is still receiving support for fixes. Perhaps the gap here is because of that, I am not sure. If this is an issue I should take up with the passport-auth0 package, let me know, however this is a blocker for my project.
Screenshots
I can provide screenshots, just please contact me directly.