StanfordSpezi / SpeziAccount

The Spezi Account module to enable login and signup functionality
https://swiftpackageindex.com/StanfordSpezi/SpeziAccount/documentation/
MIT License
5 stars 5 forks source link

Follow Up Collected Information #53

Closed MarcSchlichting closed 3 weeks ago

MarcSchlichting commented 6 months ago

Follow Up Collected Information

:recycle: Current situation & Problem

In the default configuration, the date of birth and the gender identity are .collected, but not .required. When the user uses the self signup method, they are presented with items from both categories. However, in some use cases, self-signup might not be the preferable way how users log into an application. In this case a provider can create an account for them (e.g. through Firebase). When the user logs in for the first time the details.isNewUser is no longer true and only the .required categories are displayed. In case an application allows for both self-signup and provider sign-up this leads to a difference in collected information about the user which is undesirable.

:gear: Release Notes

:books: Documentation

By setting the includeCollected argument of the missingRequiredKeys always to true results that the user is always presented with the full follow up sheet, not just the truncated version. Note that by doing this, fields of the .collected category still are not mandatory.

:white_check_mark: Testing

The behavior was intensively tested with the TBI application developed as part of Stanford CS342 and no issues were found.

:pencil: Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Supereg commented 1 month ago

Within #62 we have slightly tweaked how the FollowUpInfoSheet is presented and added additional controls to fully customize the experience.

In general, we ask for follow-up information to cover two use cases:

This continues to be the default, making sure that we adapt to changes in the AccountValueConfiguration and make sure to ask follow up question for signup providers that are not capable of showing all account keys upon signup. We still aim to not show collected account keys more often than we can guarantee is required.

However, this behavior can now be customized. The following changes were made:

Supereg commented 3 weeks ago

As discussed in the previous comment, the issue was resolved by adding greater flexibility for the Follow-Up Info sheet. Closing this as #62 got merged and release.