Enable users to use their existing WordPress password in Payload #12068
andershermansen
started this conversation in
Show and tell
Replies: 1 comment
-
Thanks for the plugin which showed me the way @thgh |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Found a plugin for payload 2 (https://github.com/thgh/payload-plugin-wordpress-password). Implemented it as a simple hook instead for payload 3.
It assumes your auth collection is
users
and that you have a fieldwordPressPasswordHash
which stores the password hash imported from WordPress. It will do the conversion once, and delete the hash when password is correct and converted.You also need to install the wp-passhash package to do the password check against the old hash.
Use it like this in your users collection:
Beta Was this translation helpful? Give feedback.
All reactions