Skip to content

convertigo/c8oprj-lib-user-manager-ui-ngx

Repository files navigation

lib_UserManager_ui_ngx

The lib_UserManager enables your projects to include user management and authentication in your apps. This library will handle :

  • user login with user/password using a salted password security
  • user login using OpenID

For more technical informations : documentation

Installation

  1. In your Convertigo Studio use File->Import->Convertigo->Convertigo Project and hit the Next button

  2. In the dialog Project remote URL field, paste the text below:

    UsageClick the copy button
    To contribute
    lib_UserManager_ui_ngx=git@github.com:convertigo/c8oprj-lib-user-manager-ui-ngx.git:branch=8.0.0
    
    To simply use
    lib_UserManager_ui_ngx=git@github.com:convertigo/c8oprj-lib-user-manager-ui-ngx/archive/8.0.0.zip
    
  3. Click the Finish button. This will automatically import the lib_UserManager_ui_ngx project

Mobile Library

Shared Actions

guardPages

Handles access control and redirection based on the user's authentication status and the page they are attempting to access.

This shared action should be invoked from an AppGuard component.

Behavior:

  • If the user is not authenticated and tries to access a page listed in authorizedPagesOnlyWithAuthentication, they will be redirected to unauthenticatedAccessRedirectPage.
  • If the user is authenticated and tries to access a page listed in authorizedPagesOnlyWithoutAuthentication, they will be redirected to authenticatedAccessRedirectPage.
  • If the current page is not restricted based on the user's authentication status, no redirection occurs.

variables

namecomment
authenticatedAccessRedirectPageType: String | Specifies the page to redirect users to when they attempt to access a page that should not be accessible after they have already logged in (e.g., login or registration pages).
authorizedPagesOnlyWithAuthenticationType: Array of String | Specifies the list of pages that are only accessible to authenticated users. These pages should not be available to users who are not logged in (e.g., dashboard or profile pages).
authorizedPagesOnlyWithoutAuthenticationType: Array of String | Specifies the list of pages that are only accessible to users who are **not** authenticated. These pages should be hidden or restricted once the user is logged in (e.g., login or registration pages).
unauthenticatedAccessRedirectPageType: String | Specifies the page to redirect users to when they attempt to access a restricted page without being authenticated. (e.g., dashboard or profile pages).

isAuthenticatedSession

Returns true if current session is authenticated

Shared Components

ConfirmAccount

variables

namecomment
appName
imgUrl
resetKey

events

namecomment
PasswordChangedError
PasswordChangedOk

DeleteAccount

variables

namecomment
appName
imgUrl
moretext
resetKey

events

namecomment
PasswordChangedError
PasswordChangedOk

ForgotPassword

variables

namecomment
appName
imgUrl
resetKey

events

namecomment
PasswordChangedError
PasswordChangedOk

LoginComponent

This component handle a login / password form. And uses the lib_UserManager

The component will check user / password and if successful will autenticate the user. When the user is authenticated, the component will fire a 'login' event that you can handle with a SubscribeHandler. use this event to close a modal page or to push/root a new page when the user is authenticated

variables

namecomment
enableAzureADLoginSet to false to disable login with AzureAD
enableCancelDismissSet to true if you want a cancel button to be displayed causing a Modal Page dismiss
enableGoogleLoginSet to false to disable loggin with google
enableLinkedInLoginSet to false to disable login with LinkedIn
logoImageA logo image to be displayed over the login form (64x64)
logoWidth
scopeAdditional Scope to be added to the standard Scope. This will be concatenated to to the scopr string. For Azure AD start with a + sign
tenantidThe tenant ID you want to restrict to, leave blank for no tenant.

events

namecomment
loginThis event will be fired when a login occurs : Check out.error and out.message for login errors The out.user will be user logged in