The balance between client and server functionality
- by Eugen Martynov
I want to bring the discussion that started in our teams and get your opinion about it.
Assume we have an user account which could have different credentials for authentication and associated email to recover. An user has possibility to do signup with an email or use his social profile to complete signup process.
As an Rest API from the backend to client looks like:
Create account
Authorise
Update user data
Link social account
Register email
Verify email
In addition our BE is distributed and divided between several services/servers/clusters. So different calls are related to different end points.
In case of the social sign up some of steps should be skipped or simplified. For example, with Facebook signup we could already skip email registration and verification step (we ask email permission form user), linking the social account and pre-fill user displayed name. So we proposed to have another end point which will hide/combine different calls on BE and return whole process result to the clients.
The pros for this approach:
No more duplication of functionality between clients
Speed up the networking and user experience
The cons for this approach:
Additional work for backend
Probably most complex scenarios in future updates
I would like to get your opinion or experience with this situation. Especially if you already experienced point #2 from against reasons.