-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Logout Button Allows to Skip Account Setup #21
Comments
This is an interesting issue; thank you for sharing this @Supereg! SpeziAccount/SpeziFirebase does actually include the functionality to set the Can you reproduce that this method is called? Maybe we don't properly refresh the view or have some other errors in the handling logic to observe the signed in or signed out state? |
The problem is that we are navigating to the next onboarding step on the receive handler of the I will address this issue once I'm upgrading the template app to the new SpeziAccount version. |
@Supereg Is this issue still relevant with the latest chances that we made in the template app? |
You are right, this was resolved with #35 |
Description
The
AccountSetup
can fundamentally display two different statesIn the second state, the UI displays an logout button (e.g. allowing you to change your account again). This can be either reached when navigating back from the "HealthKit Access" view or when uninstalling and reinstalling the app.
The problem is that when pressing the
Logout
button the view will jump to the next onboarding step allowing to skip Account onboarding.Reproduction
Back
.Logout
button (this will trigger the will change of theAccount
instance wheresignedIn
is still set to true, resulting in ouronReceive
handler getting called and navigating us to the next onboarding step).Expected behavior
I would expect the
AccountSetup
view to just re-render when pressing theLogout
button, requiring me to create a new account or sign into a different account.More specifically, as a programmer, I would expect that once the user completed the onboarding flow, I can be pretty sure that they are signed into an account.
Additional context
A possible workaround is to set
signedIn
to false before calling theLogout
button action.I haven't gone into the specifics on how SpeziAccount/SpeziFirebase specifics work. It may be sensible to provide a first party API to handle sign out. Or is there already?
Code of Conduct
The text was updated successfully, but these errors were encountered: