Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

📁 Table of Contents

Table of Contents
stylenone

...

  • Download script build files.

  • Ensure the script is configured with the correct OnAge ondato-sdk library build file in the index.html.

  • Obtain the static OnAge setup idyour unique idv setupId. Process configuration is specified based on your needs.

  • The SDK can be utilized by generating an idv ID or by using idv setupId (where the idv id is generated automatically)

  • Verify the Web browser version limitations.

    • Refer to the documentation here.

...

Info
  • Purpose: To invoke the initial Web SDK instance.

  • Return: On success, it provides the onAgeidv.begin() and onAgeidv.end() methods.

  • Accepted property: The mode interface (used for setting the environment).

Expand
title|| CLICK TO VIEW MORE ||
Code Block
languagenone
declare enum SdkMode {
  Production = "Production",
  Sandbox = "Sandbox"
} 

⚠️ Possible exceptions:

Code Block
languagenone
declare enum SdkLoadFailure {
   NotSupportedMode = 'NotSupportedMode' // incorrect mode (environemnt) provided
}

...

2️⃣ exampleSdk.

...

idv.customiseStyleonload()

Info
  • Purpose: This function enables customization of certain CSS styles within the SDK.

  • Accepted property: ({ background: { opacity: 0, blur: '0' } })

Expand
title|| CLICK TO VIEW MORE ||
Code Block
export type BackgroundStyle = {
  /**
   * IDV SDK backround opacity.
   * CSS property opacity.
   * Default is 0.9.
   */
  opacity?: number | null;

  /**
   * IDV SDK backround blur.
   * The radius of the blur in px / rem / em / etc.
   * Default is 0.375rem.
   */
  blur?: string | null;
};

export type CustomiseStyleProps = {
  /**
   * SDK backround styles.
   */
  background?: BackgroundStyle | null;
};

...

3️⃣ exampleSdk.

...

idv.begin()

Info
  • Purpose: Creates OnAge idv session.

  • Accepted property: onAgeSetupIdidvSetupId, idvId, language, onSuccess, onFailure, onClose

Expand
title|| CLICK TO VIEW MORE ||
Code Block
exampleSdk.onAgeidv.begin({
  onAgeSetupIdidvId: 'xxxxxx-xxxx' // "Unique session id.
  idvSetupId: 'xxxxxx-xxxx', // Static onAge setupId provided by support idv configuration id unqique for the client. 
  language?: 'bg-BG' // possible languages are listed below or can be found in the interface
  onSuccess:  // callback fired on successful completion
  onFailure:  // callback fired on any failure mentioned in possible exceptions
  onClose:  // callback fired when sdk process is closed
});

⚠️ Possible exceptions:

Code Block
declare enum IdvSdkBeginFailureSdkBeginFailure {
  NoOnAgeSetupId = 'NoOnAgeSetupId',
  CantBeUsedInIframe = "CantBeUsedInIframe", // Consumer cannot use this sdk in iframe. We restrict usage due to requiring full screen
  NoIdvId = "NoIdvId", // idvId or idv setup id was not provided
  NotSupportedMode = "NotSupportedMode",// check if provided mode is invalid according to SdkMode 
  ProcessStarted = "ProcessStarted", // if multiple sdk begin were started error. You cannot start multiple identifications in the same page simultaniously. 
  StartFailed = "StartFailed" //  if sdk applications has crashed for some reason when trying to initially load the sdk application. Due to nework error etc. 
}

declare enum SdkProcessFailure {
  ConsentDeclined = "ConsentDeclined", // if user declines consent, sdk application is closed and error is returned
  FailureExit = 'FailureExit', // When process gives a dead end reason and process failed, user is prompted with exit from sdk application button. Button is clicked - sdk application is closed and FailureExit is returned.
  Generic = 'Generic', // An error during sdk application flow happened and we cannot provide the exact reason why the process failed. Sdk closes and returns Generic error. (Something similar like internal server error)
  InvalidId = 'InvalidId',  // no accessToken or no session id case.
  Unauthorized = 'Unauthorized', // in case of invalid session id, in case of expired session id, in case of any other way invalidated session id, in case of completed session id, in case of session id that does not belong to accessToken etc.
  Aborted = 'Aborted', // if user aborts Identity verification process.
  Suspended = 'Suspended', // If identify verification process was suspended
  Expired = 'Expired', // If identify verification process was suspended
  NotSupportedBrowser = 'NotSupportedBrowser',
  NoIFrameContainer = 'NoIFrameContainer', // If user closes sdk application in an unknown way and there is still an sdk application instance running.
  CurrentSessionIdAndPassedIdMismatch = 'CurrentSessionIdAndPassedIdMismatch', // session id was does not match previous session id
}

...

4️⃣ exampleSdk.

...

idv.end()

Info
  • Purpose: Closes SDK application without error. Cleans up all sdk tasks and application.

  • Accepted property: None

...

...

...

❔ Frequently Asked Questions (FAQs)

  • Why should both the begin()andload()methods be used within a try-catch block?

    • Both methods should be utilized within a try-catch block to ensure proper error handling.

  • What happens to the session id during an F5 (page refresh)?

    • In the event of an F5 (page refresh), the same session id will be retained, allowing the same session to be loaded seamlessly.

  • Where can I find a list of available languages?

  • What is IdvId and idv setupId

    • Idv id is process session id (each session has a uniquely generated idvId), and idv setupid id is unique static client configration id (static id always remains the same)

  • What is Idv

    • Idv is a shortname and stands for identity verification.

...

🗒️ Changelog 🔗

...