New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost params on user creation using strapi-plugin-passwordless #9
Comments
I have found a working solution for this, and commited it into my forked version of this repository. I'll create a pull request in order to let you decide if it is worthwhile, or not. This solution works this way: if you need more params (e.g. "avatar"), there are two things to do:
This is how it would look in the previous example:
|
gundall
pushed a commit
to gundall/strapi-plugin-passwordless
that referenced
this issue
Sep 7, 2022
Relates to Issue kucherenko#9
@gundall thanks for the solution, works well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! I noticed that if you use the plugin's
/api/passwordless/send-link
endpoint with non-existing user data, it will create a new user with that data. I'm taking advantage of this feature in my project's registration view, but I need to add an avatar as an additional parameter:The problem is that when I send the data to the endpoint (avatar, username, and email), the "avatar" field is ignored by the plugin. If I check the users-permissions's beforeCreate life cycle method, the "params" field doesn't contain "avatar"; it is removed:
Is there a way to make the plugin to keep certain params if required?
Thank you in advance!
The text was updated successfully, but these errors were encountered: