Connect your application

To configure and connect your application with Veriam, follow these steps:

Configuration at Veriam

  1. Log in to your Veriam Admin Portal.

  2. Navigate to the 'Applications' page.

  3. Click on 'Add Application'.

  4. Enter your application details, including 'Application Name' and 'Description'.

  5. For 'Application Type', select the type that best suits your application.

  6. Enter your 'Application URL'. This is the URL where your application can be accessed. This information is for internal use only and is not shared with customers.

  7. Go to the Connection Configuration tab. Enter at least 1 ‘Redirect URL’, this is the URL where Veriam sends the user after authentication.

    1. You can add multiple Redirect URLs. If multiple Redirect URLs are entered, make sure to indicate which Redirect URL needs to be used in the authentication request.

  8. Click on 'Save'. Your application is now configured.

  9. You will see a popup with the Client Secret. Make sure to copy this and add this in the configuration of your application.

  10. Close the modal and copy the Client ID. Add this to the configuration of your application as well, together with the Veriam OpenID Connect Discovery URL.

Configuration at your application

Veriam uses the OpenID Connect (OIDC) as authentication protocol.

Make sure to configure the Client ID, Client Secret and OIDC Discovery URL in your application.

  • The Client ID can be retrieved from the ‘Connection Configuration’ tab of your application configuration (under the menu item ‘Configuration’, ‘Applications’ tab).

  • The Client Secret is provided after adding your the application to Veriam. If needed, you can renew the Client Secret by clicking the ‘Renew Client Secret’ option on your application detail page. Note: Doing this will make the previous client secret unusable.

  • The OIDC Discovery URL can also be found on the application detail page.

Make an authentication request / Redirect user to Veriam for login & sign up

Below description is for a Single Page Application (SPA). Other examples will become available later, but the generic steps are the same.

Single Page Application (SPA)

To integrate Veriam with a SPA you can use an OpenID client like the oidc-client-ts, for example. The first step is define the configuration and the associated User Manager:

import { UserManager, WebStorageStateStore } from "oidc-client-ts";

const settings = {
  // Where the tokens will be stored
  userStore: new WebStorageStateStore({ store: window.localStorage }),
  // URL to the authentication server (including realm)
  authority: "<https://idp.myveriam.com/oauth2>",
  // The name of the client the Authorization Server
  client_id: "YOUR_CLIENT_ID",
  // Where to redirect the user to after successful authentication
  redirect_uri: "YOUR_CALLBACK_URL",
  // Where to redirect the user to after logging the user out
  post_logout_redirect_uri: "YOUR_POST_LOGOUT_URL",
  // Indicate that the authorization code flow should be used
  response_type: "code",
  // "openid" tells the server that this client uses oidc for authentication
  scope: "openid email profile",
  // Enable automatic (silent) renewal of the access token
  automaticSilentRenew: true,
}

const userManager: UserManager = new UserManager(settings);

You can then trigger a login from your app using the command below:

userManager.signinRedirect().then();

And also a logout:

userManager.signoutRedirect().then();

To retrieve information about the User which is authenticated:

import { User } from "oidc-client-ts";

userManager.getUser().then((user: User) => {
  // The details about the user are in user.profile
});

Last updated