Managing the anonymous user
ProFitOro allows unregistered users to use the application as well. The only difference is that these unregistered users are not allowed to configure their settings as well, as they do not have access to their statistical data. They also cannot manage workouts. So, this is where we meet the second A of the triple-A definition – authorization. How can we manage these users? How can they actually enter the application if we only allow our users to sign up and log in? Well, for some reason, we have prepared the part that says Go to App. Let me remind you how it looks in the mockups:
Luckily for us, the Firebase authentication API provides a method to sign in the anonymous user. The returned user object contains the isAnonymous
attribute, which will allow us to manage the resources that can or can't be accessible to this anonymous user. So let's add the action called authenticateAnonymous
and call the corresponding...