Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Passport.js strategies

default discord avatar
elkostlast year

Hi, have a trouble with use passport.js in payload cms


When i trying to use GoogleOAuth2 strategy, i got the error messages like this:


ERROR in ./node_modules/oauth/lib/oauth2.js 1:17-39
Module not found: Error: Can't resolve 'querystring' in '/Users/elkost/Documents/itg-custom-illustrations/payload-cms/node_modules/oauth/lib'

I trying to solve this with

https://payloadcms.com/docs/admin/webpack#aliasing-server-only-modules
    webpack: (config) => ({
      ...config,
      resolve: {
        ...config.resolve,
        alias: {
          ...config.resolve.alias,
          [customersApiPath]: emptyObjectPath
        }
      }
    })
  },

But this not help


Have anyone solution?

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.