I want to build an app that will have have several monoliths. My question (similar to this one) is, how do I centralize User
model between these apps, i.e. how to deal with user management/authorization/authentication without duplicating code. For some context, I'm using code driven development with Django.
This is what I came up with:
=========== ======================= ===============
== App 1 == <---> = Shared API with DRF = <---> ==== App 2 ====
=========== ======================= ===============
= barcode = = * Users = = web app for =
= scanner = = * Roles = = shopping =
= android = = * Privilages = ===============
=========== = * User data =
=======================
^
=============== |
==== App 3 ==== <-------------
===============
= web app for =
= retailers =
= to upload =
= goods =
===============
Is this good architecture when several applications need to share same users? Is there an alternative? For example, how would one extend this model to accept users that login, for example, using oAuth with Google account or similar? Is it possible to do this without using microservice architecture? Also, is it better to use GraphQL (to share User data as an Object) or REST for the API?