LoginView

Label: :IA_Function
Property: type: LoginView
Inherits from: Function and View

The LoginView Function shows the Graphileon login form. It supports username and password login, two-factor authentication, account recovery, and optional third-party authentication buttons.

Function parameters

Key Description Default value Possible values
error Error message shown above the login form. undefined string
accountRecovery Shows the Forgot password? link when enabled. Value of accountRecovery from config.json boolean
loginProviders Controls which third-party authentication buttons are shown. See Provider resolution. undefined array of provider objects

Provider resolution

loginProviders distinguishes between an omitted value and an explicitly supplied array:

Input Behaviour
Omitted or undefined Starts with no provider buttons. If the Graphileon edition supports Passport integration, enabled providers are loaded from the authentication configuration.
[] Explicitly disables all provider buttons. Configured providers are not loaded.
Non-empty array Uses the supplied providers directly. Configured providers are not loaded.

An explicitly empty array can therefore be used to keep username and password login available while hiding all social or single sign-on buttons:

{
    "type": "LoginView",
    "loginProviders": []
}

Each provider object accepts the following properties:

Key Description Example
name Authentication strategy name. company-sso
type Provider type used for button styling and icons. okta
caption Text shown on the button. Sign in with Company SSO
url Authentication URL opened when the button is clicked. /api/authentication/company-sso

Example with a caller-supplied provider:

{
    "type": "LoginView",
    "loginProviders": [
        {
            "name": "company-sso",
            "type": "okta",
            "caption": "Sign in with Company SSO",
            "url": "/api/authentication/company-sso"
        }
    ]
}

Supplying a provider only creates its login button. The corresponding authentication strategy must also be configured on the server. See Third party authentication.

Outgoing triggers

Besides those inherited from Function and View, LoginView does not expose additional outgoing Trigger events.