Implementing payload-plugin-oauth issue

default discord avatar
Ipce
12 months ago
10

Hi all,



I'm trying to implement oauth using payload-plugin-oauth by @thgh. . The oauth provider should be Django application an that part is done, application registered and I've got CLIENT_ID and CLIENT_SECRET.



After configuring plugin I'm getting strange error and I'm not sure how to continue debugging after a few hours of struggle (maybe it's nothing, I don't have much experience in node so I'm missing something obvious).



Can you please give me some thoughts on this, thanks!

  • default discord avatar
    thgh.
    12 months ago

    Did you run

    rm -rf node_modules/.cache

    after adding the plugin?



    Also, did you upgrade payload? In that case consider

    rm -rf node_modules

    and then yarn or npm install. I think I saw that error last week when switching back and forth. Not sure though.


    The error you are seeing comes from webpack that is generating the admin panel internally.

  • default discord avatar
    Ipce
    12 months ago

    Yup, I've tried to remove node_modules and to update payload to 1.1.26, error is still there...



    "I think I saw that error last week when switching back and forth."


    This gives me hope 😅

  • default discord avatar
    thgh.
    12 months ago

    Oh, try adding this to your global config:


    admin: { webpack: a=>a }


    There was an error when there was no webpack config, I thought it was though

  • default discord avatar
    Ipce
    12 months ago

    That worked, thanks!!

  • default discord avatar
    beewhoo
    8 months ago

    hey guys was also using this plugin, is there a way to redirect to another FE after successful auth @thgh.

  • default discord avatar
    thgh.
    8 months ago
  • default discord avatar
    bibek
    6 months ago

    nice thanks @thgh. , i noticed when logging out,

    /logout

    the token generated by oauth doesn't get revoked by payload, any idea?

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.