For the Coaching Module we have developed custom Authorization Flow, which is located in Auth Module and its dependents.
Here will be described common issues and ways to solve them.
To fetch user data call https://<env|client>-backend.medvision360.org/person/<personId>, where <env|client> - your environment/client and personId - id which can be taken from the accessToken. Our Auth Module automatically adds the id to the NgRx Store.
Unfortunately, for now we don't have any Doctor specific APIs. You can do everything for Patient, but for the Doctor - not.
There're several known bugs in the Auth Module. We are working on them.
After user signs up, he receives an email with the confirmation link. Now the link is only one and it follows the user to the corresponding Patient module.
For example - if user signed up at https://dev-coach.medvision360.org/ he will be redirected to https://dev.medvision360.org/ no matter what is his role.
The enum should use [ home, work, temp, old ] values, but currently we have [ HOME, WORK, TEMP, OLD ] values there.
Unfortunately, after accessToken expires, the Auth Module doesn't renew it automatically. So after 15 minutes of session is expired and any new user action asks him to re-login.
When session expired, user still can see current page. But any route action will navigate him to the Login page. After the fix user will be automatically redirected to the Login right at the moment when token is expired.
NgRx state is not cleaned on logout at all, only localStorage data is cleared.