Skip to content
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

feat: custom payload properties for registration #218

Merged
merged 4 commits into from
Jan 21, 2022

Conversation

luke-z
Copy link
Contributor

@luke-z luke-z commented Jan 20, 2022

PR to implement the feature proposed in issue #189.

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Added the possibility to add custom user fields to the registration payload.

[field: string]: string | number | boolean | object | Array<string | number | boolean | object>

The types string, number, boolean and object together with the same types as an array should cover all possible fields in Strapi.

I also checked if the register endpoint can somehow handle FormData (spoiler, it doesn't) to add a profile picture on registration. But since this would be a custom change to a Strapi controller, it's not really needed here.

Furthermore I added the cas authentication provider which I found in this tablist and the possibility to add a custom provider string, as it is possible to add custom providers to Strapi.

Finally, I went through all pages of the documentation and just verified / corrected links which point to a certain line of code. I also corrected the register example which used identifier & password as payload properties and added the phoneNumber property as an example.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

@benjamincanac
Copy link
Member

I completely forgot about updating the links in the documentation after all the changes we made recently.
Thank you so much @luke-z!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible changes to the StrapiRegistrationData interface
2 participants