open-index/open-npm huggingface dataset:
npm package: @muljin/muljin-auth
Description: Muljin authentication library for Angular
Author: Muljin Pte. Ltd.
Latest version: 0.0.6

# Muljin Auth Angular
This package contains the core Muljin authentication library for Angular. It works with the Muljin.Auth C# package for the backend to enable user authentication, organizations and permissions in a SaaS type application.
To use within the context of a SaaS application, it is recommended to use the Muljin SaaS package which includes this package.

## Installation
Add the package @muljin/muljin-auth to your angular project.

Then add the providers to your app by adding the provideMuljinAuth(config) function to your app module, where the config should be a MuljinAuthConfig object and include the following properties;

```
 muljinAuth: {
    apiUrl: '[API_URL]',
    clientId: '[PORTAL_CLIENT_ID]',
    logoUrl: 'URL_TO_YOUR_LOGO',
}
```

next, add the muljin auth routes as part of your routes configuration by merging them with your existing routes:
```
provideRouter([...routes, ...MuljinAuthRoutes]),
```

And you are done. The Muljin Auth library will now handle the authentication and authorization for your application and provide a login box.

To access the current authentication state use the AuthService service.