Authentication Provider

1. Description

Usually, sensative and personal data shoud not be accessible for unknown users. Accessing such data requires the user to be authenticated via at least one trusted authentication provider.
Additional security layers such as access tokens or refresh tokens should also be considered when dealing with authentication and authorization.
A lot of authentication providers exist out of the market such as, Auth0, Firebase Auth, Clerk, KeyCloak, Amazon Cognito to name a few.
Just like any application, averos applications could include an authentication layer that relies on an authentication provider.
The current averos framework version is built on top of Averos auth provider, which is defined as a custom authentication and authorization api that was built around jwt, access tokens and refresh tokens.

2. Averos Authentication Provider

Averos comes with a built-in authentication provider based on jwt.
Averos Authentication Provider is composed of an authentication and authorization apis based on access tokens and refresh tokens implementations; along with a User Management api that manages Users and Roles.
Averos Authentication Provider is currently used as the authentication provider for WiBuild application and will be soon available for everyone as a service.

3. Custom Authentication Provider

The current averos version does not support generating applications without an authentication provider. So, since an averos application needs an authentication provider, you might want to implement one according to the specifications mentioned here.
Also, in order to link your application to your service provider, you might want to create an averos service configuration.
Averos offers a built-in authentication service that you might want to bind with your custom authentication api location attributes such as server location, port or uri.
Binding an averos service to its related api implies the creation of a specific averos configuration.
This configuration should match an id whose value is equal to AuthService which stands for the name of the custom built-in averos service that is in charge of authenticating, authorizing and managing averos users.
Below is an averos workflow command template that should create such a configuration.

ng g @wiforge/averos:averos-config --id=AuthService --type=service --host=[your-auth-server-address] --port=[our-auth-server-port] --protocol=[our-auth-server-protocol] --endpoint=[your-auth-api-uri]

πŸ”– Note that, future averos version may include support for known authentication providers such as Auth0, Amazon Cognito or Firebase Auth