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!
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.
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 😅
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
That worked, thanks!!
hey guys was also using this plugin, is there a way to redirect to another FE after successful auth @thgh.
There could be an extra option
redirectURL
that would be applied here:
https://github.com/thgh/payload-plugin-oauth/blob/d422f815127d90e3356b355bc22a41b45a4af0d5/src/index.ts#L308nice thanks @thgh. , i noticed when logging out,
/logout
the token generated by oauth doesn't get revoked by payload, any idea?
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.