Preauthenticate Exact Online

To preauthenticate an Exact Online application, please execute the following steps:

Preparation

Ask Invantive Support for the values of your app, or execute the following steps:

Navigate to the Exact App Center:

exact-app-center

Choose the correct country.

Log in:

exact-app-center-log-in

Choose 'Manage my apps':

exact-app-center-manage-my-apps

Choose the app that you wish to preauthenticate.

Click on 'Show' next to the client secret.

Take note of the following values as shown below: client ID, client secret and redirect URI.

exact-app-center-app-client-id

Preauthenticate

Then preauthenticate the application:

Open Invantive Cloud.

Choose "Preauthenticate" in the menu.

Read and fill out the form as shown using the values previously noted:

exact-app-preauthenticate-form

When you use a redirect URI different from cloud.invantive.com, remember to check the box "Deviating Redirect URI". If so, an additional form appears labeled "Exchange Code".

Click on the "Preauthenticate" button.

Exact Online will now ask you to authenticate yourself:

exact-online-authenticate

On successful authentication, Exact Online will ask you to authenticate access by the application to your Exact Online data with the same privileges as the user:

exact-online-authenticate-app

Click on "Allow".

The browser will be redirected to the redirect URI.

The URL will contain essential information for preauthentication.

Click in the URL and copy the whole URL to the clipboard:

exact-online-redirect-uri-with-token

Exchange the URL into a OAuth2 refresh token by pasting it in the field "Code Return URL" and press the button "Exchange".

exact-online-exchange-code

The resulting page displays the settings for preauthenticating your application:

exact-online-authenticated-app

The field "Refresh Token" contains the OAuth2 refresh token.

The field "Content settings.xml" contains an Invantive database definition for storage as a file named settings-<NAME>.xml in %USERPROFILE%\invantive. Confidential information in the connection string is however readable in plaintext.

To encrypt the connection string in settings.xml with your Invantive device key, you can use the Invantive Script statement in the field "Encrypt Statement". You must execute this statement on the same device as you will be using the connection string since encryption with the Invantive device key effectively binds the encrypted text to the hardware.