Don't use global passport singleton. #8873
sandstone991
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an Express based server that uses its own authentication through Passport. After adding payload to my project I noticed that authentication stopped working. I also found that removing Payload makes auth work again.
It's likely because Payload uses the singleton passport exports which overrides my settings.
payload/packages/payload/src/auth/init.ts
Line 1 in fa6d459
https://stackoverflow.com/questions/53678779/how-passport-strategy-works-behind-the-scene
Expected behavior:
Payload doesn't interfere with my code and initializes its own passport instance.
Beta Was this translation helpful? Give feedback.
All reactions