Passport.js strategies

default discord avatar
elkost
3 weeks ago

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?

    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!

    Star

    Connect with the Payload Community on Discord

    Discord

    online

    Can't find what you're looking for?

    Get help straight from the Payload team with an Enterprise License.