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.

How to integrate Google SSO with existing Payload Authentication configure with one collection?

default discord avatar
hanan_mehmood3 years ago
22

Currently, we are using Payload CMS authentication with collection

Users

. We want to allow users to signup their account via organisation Google SSO. Would appreciate having information in this regard.

  • default discord avatar
    iamroot3 years ago

    Payload has an SSO plugin for enterprise users which is probably what your looking for, they also use passport.js for panel auth so you could look into extending that

  • default discord avatar
    hanan_mehmood3 years ago
    @148846159564111872

    Thanks for responding on my query. I am looking forward from the

    @967091941873426493

    team to give me more details about SSO for enterprise. Besides, I was looking at the examples of strategies being in used. Can you share any example by code ?

  • default discord avatar
    iamroot3 years ago

    unfortunately I only know the theory no code yet

  • default discord avatar
    hanan_mehmood3 years ago

    alright.

    @967118574445547650

    Can you kindly share something around it?

  • default discord avatar
    iamroot3 years ago
    @364124941832159242

    aswell 🙂

  • discord user avatar
    denolfe
    3 years ago
    @685569866400399360

    If you're looking for more information about Payload Enterprise, which includes SSO, go ahead put your info into this form 👍

    https://payloadcms.com/for-enterprise
  • default discord avatar
    hanan_mehmood3 years ago
    @967118574445547650

    I have done that already and waiting for the more information. Besides, trying out Google auth strategy but failing miserably. Was curious, if we have any example using passport strategy in Collection with Auth.

  • discord user avatar
    denolfe
    3 years ago

    There are a few related community plugins listed here.

    https://github.com/topics/payload-plugin
  • default discord avatar
    hanan_mehmood3 years ago

    Done this around 3 hours but waiting for follow up emails.

  • discord user avatar
    denolfe
    3 years ago

    It's usually 1-2 business days. We're also on Eastern Standard Time, so just starting the day 👍

  • default discord avatar
    hanan_mehmood3 years ago

    Gotcha, Thank you for sharing the details 🙌🏻. Looking into these



    Facing the following issues with google-one-tap



    cc:

    @274881403454226434
  • discord user avatar
    denolfe
    3 years ago

    Looks like some webpack aliasing needs to be done

  • default discord avatar
    hanan_mehmood3 years ago

    Have done which was mentioned in the repio readme though

  • discord user avatar
    jmikrut
    3 years ago

    try and

    rm -Rf node_modules/.cache
  • default discord avatar
    hanan_mehmood3 years ago
    @364124941832159242

    Did but there is no change.

  • discord user avatar
    jmikrut
    3 years ago

    ok - we can talk about this more on our call this afternoon - saw you scheduled 👍

  • default discord avatar
    hanan_mehmood3 years ago

    Added in the


    webpack: {
    ...
      resolve: { ..., fallback: {..., zlib: false, async_hooks: false,}  }
    }

    This fixed but now facing new issue xD



    Sure, Looking forward to it.

  • default discord avatar
    lekaytor4 months ago

    Did you manage to solve this? Or did you have to pay up? Hahaha, I’m asking because I’m facing a similar issue…

  • default discord avatar
    rubixvi4 months ago

    this is like an old post that uses an old version of payload probably v2...


    https://rubixstudios.com.au/insights/payloadcms-custom-auth-strategy

    follow that article for v3

  • default discord avatar
    lekaytor4 months ago

    Thanks a lot, my friend. I’m going to try replicating it with Azure SSO. On the backend everything works great — I’m using JOSE for OAuth2.0 (an open source library supported by Auth0 by Okta). But my issue is on the frontend: the admin fails, and I’m using the same envs from a legacy frontend repo, yet here it fails because it redirects me back to the login. Did something similar happen to you? My intention is to remove the entire CMS login and use a fully customized component — the BeforeLogin property wouldn’t work for me, I’d need to replace Login, but it’s not working

  • default discord avatar
    rubixvi4 months ago

    the same strategy works for both front and back



    also i've already done google, azure, etc with jose and kv



    just didn't bother posting that implementation up

  • default discord avatar
    lekaytor4 months ago

    thanks brother, I’ll give it a try I’m sure it must be something silly. I hadn’t thought about using a custom endpoint; I assumed Payload could interpret it, but it seems that’s not the case, even though the OAuth2.0 protection works fine on the backend side

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.