I am looking for a way how to implement authentication and authorization fo several applications.
- I have one main application and several child application.
- I have only one domain so I access my child applications like a
mydomain.com/app1
.
My goal:
- Use one account for all web applications
- Have specific permission for each user, for each application
- Implement register, login views only once.
My thoughts are: - Create one WebApp/API which will maintain user accounts - Call this webapp from other apps
I was googling a lot and I found some technologies which could be useful:
- Jwt bearer token - generate token with claims and in each app implement logic which claims are necessary for specific policy
- Identity server 4
I am so confused from identity server so I don't undestand how to use it (but according to description I thnik it could help to solve my problem)
Something like this scenario:
- Request web page
- WebApp checks authentication (proprably Jwt token?) if user is not authenticated call auth server --> some login page
- After authentication Jwt is generated, Jwt & webpage from web app is returned to user
I saw lot of samples, but most of them are for fronted backend solutions, mobile applications etc..
I would like to use simple MVC, Razor pages apps..
Are my thoughts right or it should be done in other way? Could you recommend me some technologies, tutorials how to achieve this?
Thank you very much!