const eidEasyClient = window.eidEasyBrowserClient.createClient({clientId:'2IaeiZXbcKzlP1KvjZH9ghty2IJKM8Lg',// requiredredirectUri:'http://localhost/',// requiredapiEndpoints:{// requiredidentityStart:()=>'https://eid-sample-app.test/api/identity/start',identityFinish:()=>'https://eid-sample-app.test/api/identity/finish',},countryCode:'EE',// requiredlanguage:'et',sandbox:true,oauthParamState:'custom-state-value',// this gets used only in case of identification methods});
Required. Get from id.eideasy.com after signing up.
redirectUri
string
undefined
Required. This gets used for redirects back to your application e.g. when using eParaksts mobile. The value of redirectUri has to match with the "Oauth redirect_uri(s)" setting you provided in your eID Easy admin page.
# Implementing the identityStart and identityFinish endpoints
You should implement and expose two endpoints on your server to handle the identity start and identity finish requests.
identityStart endpoint should take the request body sent by the browser-client, add your client_id and secret to it and send it to https://id.eideasy.com/api/identity/{client_id}/{method}/start.
It should then return the response from https://id.eideasy.com/api/identity/{client_id}/{method}/start back to the browser-client.
identityFinish endpoint should take the request body sent by the browser-client, add your client_id and secret to it and send it to https://id.eideasy.com/api/identity/{client_id}/{method}/complete.
If the response from https://id.eideasy.com/api/identity/{client_id}/{method}/complete contains {"status": "OK" }, then the user has successfully authenticated and you can proceed with logging in the user.
In all other cases, you can return the response from https://id.eideasy.com/api/identity/{client_id}/{method}/complete back to the browser-client and the browser-client will handle the error.
See the diagram below for request examples and a visual representation of the flow.
Austrian Handy Signatur is a redirect based method, so:
user gets redirected to the Austrian Handy Signatur page where they have to enter their user and mobile number
Austrian Handy Signatur then asks the user for confirmation on their cellphone
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
eidEasyClient.identification.atHandy.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.identification.edoAppEid.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
This function gets called when the authentication process failed.
success
function
undefined
This function gets called when the authentication process succeeds.
finished
function
undefined
This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
user gets redirected to the eParaksts page where they have to enter their user number
eParaksts then asks the user for confirmation on their cellphone
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
eidEasyClient.identification.eParakstsMobile.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.identification.frejaEid.start({idcode:'xxxxxxxxxxxxx',// requiredstarted:()=>{// identification process has started,// Freja eID app will prompt the user to approve the identification request},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the authentication process has started, Freja eID app will prompt the user to approve the identification request.
fail
function
undefined
This function gets called when the authentication process failed.
success
function
undefined
This function gets called when the authentication process succeeds.
finished
function
undefined
This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
user gets redirected to the FTN page where they have to enter their user number
FTN then asks the user for confirmation on their cellphone
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
eidEasyClient.identification.finnishTrustNetwork.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
// deprecated, not stable
eidEasyClient.identification.idCard.start({fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});// using Web eID, stable
eidEasyClient.identification.webEid.start({iframeHolder: document.getElementById('webeIdIframeHolder'),// Required. DOM element whose content gets replaced with the Web eID iframefail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required (when using Web eID). DOM element whose content gets replaced with webEid iframe
fail
function
undefined
This function gets called when the authentication process failed.
success
function
undefined
This function gets called when the authentication process succeeds.
finished
function
undefined
This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
user gets redirected to the IDIN page where they have to enter their user number
IDIN then asks the user for confirmation on their cellphone
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
// IDIN identification
eidEasyClient.identification.idin.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// IDIN identification using Customer ID
eidEasyClient.identification.idinCustomerId.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
user gets redirected to the Itsme page where they have to enter their user number
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
// Itsme Identification - full user data
eidEasyClient.identification.itsme.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// Itsme Standard - full user data
eidEasyClient.identification.itsmeStandard.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// Itsme Basic - limited user data
eidEasyClient.identification.itsmeBasic.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
user gets redirected to the MitID page where they have to enter their user number
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
eidEasyClient.identification.mitId.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.identification.mobileId.start({idcode:'60001019906',// requiredphone:'+37200000766',// requiredstarted:(result)=>{// do something with the result// e.g. display the result.data.challenge code},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. End user's phone number, must have the country codeopen in new window prefixed with a '+' sign, e.g. +37200000766
started
function
undefined
This function gets called when the authentication process has started. The argument object of this function contains the challenge (response.data.challenge) you can display to the end-user.
fail
function
undefined
This function gets called when the authentication process failed.
success
function
undefined
This function gets called when the authentication process succeeds.
finished
function
undefined
This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
user gets redirected to the MojeID page where they have to enter their user number
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
eidEasyClient.identification.mojeId.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// For Poland (PL)
eidEasyClient.identification.plMojeId.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
user gets redirected to the Norwegian Bank page where they have to enter their user number
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
eidEasyClient.identification.norwegianBankId.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.identification.smartId.start({idcode:'10101010005',// requiredstarted:(result)=>{// do something with the result// e.g. display the result.data.challenge code},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the authentication process has started. The argument object of this function contains the challenge (response.data.challenge) you can display to the end-user.
fail
function
undefined
This function gets called when the authentication process failed.
success
function
undefined
This function gets called when the authentication process succeeds.
finished
function
undefined
This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
user gets redirected to the Swedish Bank page where they have to enter their user number
user gets redirected back to the redirectUri specified in the eidEasyClient settings with a token you can use to fetch data
eidEasyClient.identification.seBankId.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
When the ZealiD identification process starts, eidEasyClient will automatically create a ZealId iframe and start listening for messages originating from that iframe. You just have to provide a DOM element (the "iframeHolder" setting in the example below) to which eidEasyClient can append the iframe.
eidEasyClient.identification.zealId.start({iframeHolder: document.getElementById('zealIdIframeHolder'),// Required. DOM element whose content gets replaced with the ZealiD's iframefail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. DOM element whose content gets replaced with the ZealiD's iframe
fail
function
undefined
This function gets called when the authentication process failed.
success
function
undefined
This function gets called when the authentication process succeeds.
finished
function
undefined
This function gets called when the authentication process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
Required. Get from id.eideasy.com after signing up.
docId
string
undefined
Required. The docId of the document you have prepared for signing. You can find more information on file preparation hereopen in new window and the API reference for file preparation hereopen in new window
Aba DO is an OAuth2 based method, so the user gets redirected to Aba DO page where they can complete the signing process.
eidEasyClient.signature.abaDoSignature.start({countryCode:"DO",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
You can use this setting to override the default redirection functionality
# Adacom Long Term Certificate and OneShot QES Signature
Adacom is an OAuth2 based method, so the user gets redirected to Adacom page where they can complete the signing process.
// for Adacom Long Term Certificate
eidEasyClient.signature.adacomQesSignature.start({countryCode:"GR",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// for Adacom One Shot QES
eidEasyClient.signature.adacomOneShotQesSignature.start({countryCode:"US",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their Adacom account. Adacom Long Term Certificate works only for Greece (GR), while Adacom One Shot has much wider support.
redirect
function
undefined
You can use this setting to override the default redirection functionality
eidEasyClient.signature.audkenniQesSignature.start({countryCode:'EE',// requiredidcode:'10101010005',// requiredstarted:(response)=>{// do something with the resultconst challenge = response.data.challenge;},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the signing process has started. The argument object of this function contains challenge code that should be presented to user to make sure that correct transaction is getting approved.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
Austrian Handy Signatur is an OAuth2 based method, so the user gets redirected to the Handy Signatur page where they can complete the signing process.
eidEasyClient.signature.atHandySignature.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Buypass is an OAuth2 based method, so the user gets redirected to Buypass page where they can complete the signing process.
eidEasyClient.signature.buypassQesSignature.start({countryCode:"NO",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their Buypass account. Currently, only Norway (NO) is supported.
redirect
function
undefined
You can use this setting to override the default redirection functionality
eidEasyClient.signature.certEuropeUsbTokenSignature.start({countryCode:'FR',iframeHolder: document.getElementById('idCardIframeHolder'),// Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the id card)fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the connected USB token)
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
CertMe is an OAuth2 based method, so the user gets redirected to CertMe page where they can complete the signing process.
eidEasyClient.signature.certMeQesSignature.start({countryCode:"RO",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their CertMe account. Currently, only Romania (RO) is supported.
redirect
function
undefined
You can use this setting to override the default redirection functionality
eidEasyClient.signature.certSignUsbTokenSignature.start({countryCode:'RO',iframeHolder: document.getElementById('idCardIframeHolder'),// Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the id card)fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the connected USB token)
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
certSIGN over Web API is an OAuth2 based method, so the user gets redirected to certSIGN page where they can complete the signing process.
eidEasyClient.signature.certsignWebapiQesSignature.start({countryCode:"RO",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their certSIGN account. Currently, only Romania (RO) is supported.
redirect
function
undefined
You can use this setting to override the default redirection functionality
eidEasyClient.signature.chaveMovelSignature.start({countryCode:'PT',// requiredphone:'+37200000766',// requiredsigningPin:'1234',// requiredstarted:(response)=>{// do something with the result},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their Chave Movel account. Currently, only Portugal (PT) is supported.
phone
string
undefined
Required. End user's phone number, must have the country codeopen in new window prefixed with a '+' sign, e.g. +37200000766
signingPin
string
undefined
Required. End user's signing PIN
started
function
undefined
This function gets called when the signing process has started. The argument object of this function contains the qr code and redirectUrl. You should display QR code image and make it clickable for mobile device users. QR code should be scanned with Diia application.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
Czech BankID is an OAuth2 based method, so the user gets redirected to bank's page where they can complete the signing process.
eidEasyClient.signature.czBankIDSignature.start({countryCode:"CZ",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their bank account. Currently, only Czech Republic (CZ) is supported.
redirect
function
undefined
You can use this setting to override the default redirection functionality
eidEasyClient.signature.diiaQesSignature.start({countryCode:'UA',// requiredstarted:(response)=>{// do something with the resultconst qr = response.data.qr_code;// Base64 encoded QR code imageconst redirectUrl = response.data.redirect_uri;// as alternative to QR code},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their Diia account. Currently, only Ukraine (UA) is supported.
started
function
undefined
This function gets called when the signing process has started. The argument object of this function contains the qr code and redirectUrl. You should display QR code image and make it clickable for mobile device users. QR code should be scanned with Diia application.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
MitId is an OAuth2 based method, so the user gets redirected to MitID page where they can complete the signing process. Provides different levels of signing: SES, full advanced AdES, QES, Seal-based signature on "light" advanced level AdES
// SES
eidEasyClient.signature.mitIdSignature.start({countryCode:"DK",// required, supported countries: 'DK', 'GL'redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// AdES
eidEasyClient.signature.mitIdAdvancedSignature.start({countryCode:"DK",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// QES
eidEasyClient.signature.mitIdQesSignature.start({countryCode:"DK",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// seal-based AdES
eidEasyClient.signature.dkMitIdAdvancedHashSignature.start({countryCode:"DK",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their MitID account. Currently, only Denmark (DK) is supported.
redirect
function
undefined
You can use this setting to override the default redirection functionality
D-Trust SignMe is an OAuth2 based method, so the user gets redirected to SignMe page where they can complete the signing process. Provides different levels of signing: QES, AdES
// QES
eidEasyClient.signature.dTrustSignMeSignature.start({countryCode:"DE",// requiredusername:"test-user",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// AdES
eidEasyClient.signature.dTrustSignMeAdvSignature.start({countryCode:"DE",// requiredusername:"test-user",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their MitID account. Currently, only Denmark (DK) is supported.
username
function
undefined
Required. User's username provided by SignMe
redirect
function
undefined
You can use this setting to override the default redirection functionality
eCert Chile is an OAuth2 based method, so the user gets redirected to eCert page where they can complete the signing process.
eidEasyClient.signature.eCertChileSignature.start({countryCode:"CL",// requiredidcode:"23423423424",// requiredemail:"chile@ecert.test",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their MitID account. Currently, only Denmark (DK) is supported.
idcode
function
undefined
Required. End user's personal identification code
email
function
undefined
Required. Valid user email
redirect
function
undefined
You can use this setting to override the default redirection functionality
eMudhra is an OAuth2 based method, so the user gets redirected to the eMudhra page where they can complete the signing process.
eidEasyClient.signature.emudhraQesSignature.start({countryCode:"IN",// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their eMudhra account. Supported countries: India (IN)
redirect
function
undefined
You can use this setting to override the default redirection functionality
eParaksts Mobile is an OAuth2 based method, so the user gets redirected to the eParaksts page where they can complete the signing process.
eidEasyClient.signature.eParakstsMobileSignature.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.signature.evroTrustSignature.start({phone:'+37200000766',// requiredcountryCode:'EE',// requiredstarted:(result)=>{// do something with the result// e.g. display the result.data.challenge code},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the signing process has started. The argument object of this function contains the transaction id (response.data.transaction_id) that the end user sees on their device. You should display this code in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
// Seal-based AdES
eidEasyClient.signature.frejaSimpleSignature.start({countryCode:'AT',// requiredidcode:'1100110055',// requiredstarted:(result)=>{// do something},fail:(result)=>{// do something},success:(result)=>{// do something},finished:(result)=>{// do something},});// AdES
eidEasyClient.signature.frejaAdvancedSignature.start({countryCode:'AT',// requiredidcode:'1100110055',// requiredstarted:(result)=>{// do something},fail:(result)=>{// do something},success:(result)=>{// do something},finished:(result)=>{// do something},});// QES
eidEasyClient.signature.frejaQesSignature.start({countryCode:'AT',// requiredidcode:'1100110055',// requiredstarted:(result)=>{// do something},fail:(result)=>{// do something},success:(result)=>{// do something},finished:(result)=>{// do something},});
This function gets called when the signing process has started. The argument object of this function contains the transaction id (response.data.transaction_id) that the end user sees on their device. You should display this code in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
FTN is an OAuth2 based method, so the user gets redirected to the FTN page where they can complete the signing process. Available signature options: seal-based AdES, AdES, QES
// seal-based AdES
eidEasyClient.signature.ftnSignature.start({countryCode:'FI',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// AdES
eidEasyClient.signature.ftnAdvancedFullSignature.start({countryCode:'FI',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// QES
eidEasyClient.signature.ftnQesSignature.start({countryCode:'FI',// requiredphone:'+37200003311',// requiredemail:'user@ftn.fi',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
OneID is an OAuth2 based method, so the user gets redirected to the OneID page where they can complete the signing process.
eidEasyClient.signature.gbOneIdAdvancedSignature.start({countryCode:'GB',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
This is done through a redirect, so the user gets redirected to a view where they will see all the buttons for all the available Finnish Banks and the Mobile ID button. They then choose their preferred method and complete the signing process.
eidEasyClient.signature.ftnSignature.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Google Signature is an OAuth2 based method, so the user gets redirected to the Google page where they can complete the signing process.
eidEasyClient.signature.googleSignature.start({redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
You can use this setting to override the default redirection functionality
# GSE Gestión de Seguridad Electrónica AdES signature
GSE Signature is an OAuth2 based method, so the user gets redirected to the GSE page where they can complete the signing process.
eidEasyClient.signature.gseAdvSignature.start({countryCode:'CO',redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.signature.halcomQesSignature.start({username:'user',// requiredphone:'+37200998877',// requiredemail:'halcom@user.com',// requiredcountryCode:'SI',// requiredstarted:(result)=>{if(result.data && result.data.challenge){// do something with the result// e.g. display the result.data.challenge code}},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. End user's phone number, must have the country codeopen in new window prefixed with a '+' sign, e.g. +37200000766
countryCode
string
undefined
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their account. Currently supported in Slovenia (SI)
started
function
undefined
This function gets called when the signing process has started. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
// QES
eidEasyClient.signature.ftnQesSignature.start({countryCode:'GR',// requiredusername:'user',// requiredpassword:'pass',otpCode:'123456',started:(result)=>{// do somthing},fail:(result)=>{// do somthing},success:(result)=>{// do somthing},finished:(result)=>{// do somthing},});
This function gets called when the signing process has started. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
eidEasyClient.signature.idCardSignature.start({countryCode:'EE',// requirediframeHolder: document.getElementById('idCardIframeHolder'),// Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the id card)fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the id card)
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
IDIN is an OAuth2 based method, so the user gets redirected to the IDIN page where they can complete the signing process.
eidEasyClient.signature.idinSignature.start({countryCode:'NL',redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Itsme is an OAuth2 based method, so the user gets redirected to the Itsme page where they can complete the signing process.
eidEasyClient.signature.itsmeQesSignature.start({countryCode:'BE',redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
We supported next signature options: QES, AdES, Unverified AdES
// QES
eidEasyClient.signature.certStoreQesSignature.start({countryCode:'FR',iframeHolder: document.getElementById('localCertIframeHolder'),// Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the id card)fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});// AdES
eidEasyClient.signature.certStoreAdvancedSignature.start({countryCode:'FR',iframeHolder: document.getElementById('localCertIframeHolder'),// Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the id card)fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});// Unverified AdES
eidEasyClient.signature.certStoreAdvancedUnverifiedSignature.start({countryCode:'FR',iframeHolder: document.getElementById('localCertIframeHolder'),// Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the id card)fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. DOM element whose content gets replaced with an iframe (this iframe will be used to get the signing certificates from the connected USB token)
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
eidEasyClient.signature.smartIdSignature.start({idcode:'10101010005',// requiredcountryCode:'EE',// requiredstarted:(result)=>{if(result.data && result.data.challenge){// do something with the result// e.g. display the result.data.challenge code}},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the signing process has started. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
eidEasyClient.signature.mobileIdSignature.start({idcode:'60001019906',// requiredphone:'+37200000766',// requiredcountryCode:'EE',// requiredstarted:(result)=>{// do something with the result// e.g. display the result.data.challenge code},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the signing process has started. The argument object of this function contains the security challenge code (response.data.challenge) that the end user sees on their device. You should display this code in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
MojeId is an OAuth2 based method, so the user gets redirected to the MojeId page where they can complete the signing process.
eidEasyClient.signature.mojeIdSignature.start({countryCode:'CZ',redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
MSC TrustGate is an OAuth2 based method, so the user gets redirected to the MSC TrustGate page where they can complete the signing process.
eidEasyClient.signature.mscTrustGateSignature.start({countryCode:'MY',redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
With OTP, eID Easy will send the user either an email or sms (depending on with which parameters you initiate the flow) that contains a one time password. You then ask the user to enter that OTP in your application and then provide it to the otpSignature module.
eidEasyClient.signature.otpSignature.start({smsToken:'123455',emailToken:'873nf7ssorwdm8e',fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
SimplySign is an OAuth2 based method, so the user gets redirected to the SimplySign page where they can complete the signing process.
eidEasyClient.signature.simplySignQesSignature.start({countryCode:'PL',redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.signature.smartIdSignature.start({idcode:'10101010005',// requiredcountryCode:'EE',// requiredwaitForChallengeCode:false,// requiredstarted:(result)=>{if(result.data && result.data.challenge){// do something with the result// e.g. display the result.data.challenge code}},onTryComplete:(result)=>{if(result.data && result.data.challenge){// do something with the result// e.g. display the result.data.challenge code}},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the signing process has started. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
onTryComplete
function
undefined
This function gets called when the browser client polls for the signign session status. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
eidEasyClient.signature.esLleidaAdvSignature.start({countryCode:'ES',// requiredusername:'user',// requiredsigningPin:'1234',// requiredstarted:(response)=>{// do something with the result},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their Chave Movel account. Currently, only Portugal (PT) is supported.
user
string
undefined
Required. User's Lleida username
signingPin
string
undefined
Required. End user's signing PIN
started
function
undefined
This function gets called when the signing process has started. The argument object of this function contains the qr code and redirectUrl. You should display QR code image and make it clickable for mobile device users. QR code should be scanned with Diia application.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
eidEasyClient.signature.spidQesSignature.start({phone:'+37200998877',// requiredemail:'halcom@user.com',// requiredcountryCode:'SI',// requiredstarted:(result)=>{if(result.data && result.data.challenge){// do something with the result// e.g. display the result.data.challenge code}},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
Required. End user's phone number, must have the country codeopen in new window prefixed with a '+' sign, e.g. +37200000766
countryCode
string
undefined
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their account. Currently supported in Slovenia (SI)
started
function
undefined
This function gets called when the signing process has started. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
Swedish BankId is an OAuth2 based method, so the user gets redirected to the bank page where they can complete the signing process. Available signature options: "light" AdES, AdES, QES
eidEasyClient.signature.seBankIdSignature.start({countryCode:'SE',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// light AdES
eidEasyClient.signature.seBankIdAdvancedHashSignature.start({countryCode:'SE',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// AdES
eidEasyClient.signature.seBankIdAdvancedSignature.start({countryCode:'SE',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});// QES
eidEasyClient.signature.seBankIdQesSignature.start({countryCode:'SE',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.signature.swissComQesSignature.start({phone:'+37200334455',// requiredcountryCode:'CH',// requiredstarted:(result)=>{if(result.data && result.data.challenge){// do something with the result// e.g. display the result.data.challenge code}},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the signing process has started. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
eidEasyClient.signature.swissComQesSignature.start({email:'some@user.com',// requiredcountryCode:'CH',// requiredstarted:(result)=>{if(result.data && result.data.challenge){// do something with the result// e.g. display the result.data.challenge code}},fail:(error)=>{// do something with the error},success:(result)=>{// do something with the result},finished:()=>{// the process has finished, you can do some clean up like hiding a loader here},});
This function gets called when the signing process has started. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
TrustAsia is an OAuth2 based method, so the user gets redirected to the TrustAsia page where they can complete the signing process.
eidEasyClient.signature.trustAsiaSignature.start({countryCode:'CN',redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Trans Sped is an OAuth2 based method, so the user gets redirected to the Trans Sped page where they can complete the signing process.
eidEasyClient.signature.transSpedQesSignature.start({countryCode:'RO',redirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
eidEasyClient.signature.uanatacaQesSignature.start({countryCode:'CH',// requiredusername:'user',// requiredpassword:'pass',// requiredpin:'1234',// requiredstarted:(result)=>{// do something},confirmationCodeRequest:(result, resolve)=>{// take care of confirmation code},fail:(result)=>{// do something},success:(result)=>{// do something},finished:(result)=>{// do something},});
This function gets called when the signing process has started. The argument object of this function may contain the security challenge code (response.data.challenge) that the end user sees on their device. In case the signer has not approved the transaciton yet, it contains the session token. If challenge code is present, you should display it in your app so that the user can be sure that they are signing the right document.
confirmationCodeRequest
function
undefined
This function gets called when confirmation code has been received.
fail
function
undefined
This function gets called when the signing process failed.
success
function
undefined
This function gets called when the signing process succeeds.
finished
function
undefined
This function gets called when the signing process has either failed or succeeded. This means that this function gets called always, no matter the authentication result. For example, it can be useful to hide a loading spinner at the end of the authentication process or to do some other clean up work.
Yes.com signing is a redirect based method, so the user gets redirected to the Yes.com view where they can use their smartphone to complete the signing process.
eidEasyClient.signature.yesComQesSignature.start({countryCode:'DE',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});
Required. ISO 3166-1 alpha-2open in new window code of the country where the user has registered their Yes.com account. Currently available only for Germany (DE)
redirect
function
undefined
You can use this setting to override the default redirection functionality
ZealId signing is a redirect based method, so the user gets redirected to the Zeal ID view where they can use their smartphone to complete the signing process.
eidEasyClient.signature.zealIdSignature.start({countryCode:'EE',// requiredredirect:(context)=>{
console.log(context);// you can do the redirect here yourself should you wish so// window.location.href = context.redirectUrl;return{data:null,};},});