You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After adding a generic passport-oauth2 provider in next-auth.providers.js, I'm running into this error on /auth/oauth/mycoolprovider:
TypeError: strategy.authenticate is not a function
at attempt (/Users/joshkadis/Repos/themostlaps_v2/node_modules/passport/lib/middleware/authenticate.js:361:16)
at authenticate (/Users/joshkadis/Repos/themostlaps_v2/node_modules/passport/lib/middleware/authenticate.js:362:7)
at Layer.handle [as handle_request] (/Users/joshkadis/Repos/themostlaps_v2/node_modules/express/lib/router/layer.js:95:5)
at next (/Users/joshkadis/Repos/themostlaps_v2/node_modules/express/lib/router/route.js:137:13)
# etc., etc...
It seems like Passport can't find the function registered for the named authentication strategy. Can you provide some documentation for this step from AUTHENTICATE.md?
Add a field to your User model (in 'index.js') with the name of the provider
Thanks for the rad library!
The text was updated successfully, but these errors were encountered:
Turns out that the above error was happening because Passport was registering the strategy as oauth2 rather than as the providerName from my next-auth.providers.js. I.e. Passport couldn't find a strategy called strava when I did it this way:
Hi,
After adding a generic
passport-oauth2
provider innext-auth.providers.js
, I'm running into this error on/auth/oauth/mycoolprovider
:It seems like Passport can't find the function registered for the named authentication strategy. Can you provide some documentation for this step from AUTHENTICATE.md?
Thanks for the rad library!
The text was updated successfully, but these errors were encountered: