How to sign in CoreID - guide

The CoreID implementation guide for signing.

The signing flow is similar to the authentication flow. You will need to have your credentials at hand.

1. Embed the client

<!-- TEST -->
<script src="https://coreid-test.assently.com/embed/coreid.js"></script>

<!-- PRODUCTION -->
<script src="https://coreid.assently.com/embed/coreid.js"></script>

2. Configure and start

Here's a quick example of how to configure the client in sign mode

coreid_client.init({
  config: {
    allowedEids: ['*'],   // enable all eID providers
    mode: 'sign',         // sets the mode to signing
    language: 'en',       // set the client to use english language
    provider: 'no-bankid',// default provider to show on start
    sign: {
      title: 'Awesome document',
      data: 'This is the text that needs to be signed',
      type: 'text',
    }
  },
  token: '😎✌️🏽',
  callback: function(data) {
    // for example, send it back to your iOS webview:
    webkit.messageHandlers.callbackHandler.postMessage(data);

    console.log('CoreID response', data);
  }
});

// start the client!
coreid_client.start();

Check out the docs for a full API and configuration reference.

3. Done!