Skip to content

Cookies ​

Save2ERP only uses technical cookies, required for it to work: no tracking, no audience measurement. The sign-in token for the target system is encrypted in a cookie and can never be read by the browser.

List of cookies ​

CookieContentDurationPurpose
__Host-SWC_WordAddIn_TokenEncrypted OAuth2 tokenOAUTH_COOKIE_MAXAGE (7 days by default)User's session on the target system.
__Host-SWC_WordAddIn_SystemTarget system of the sessionOAUTH_COOKIE_MAXAGEPrevents changing system during a session.
__Host-SWC_WordAddIn_OAuthPKCETemporary sign-in values (state and code_verifier)5 minutesProtects the OAuth2 sign-in round trip.
__Host-SWC_WordAddIn_LicenseCheckLicense ID, user fingerprint, date of the check24 hoursAvoids repeating the license check each time the pane opens.

Properties ​

All cookies are:

  • signed: a modified cookie, or one signed with an old OAUTH_COOKIE_SIGN_KEY, is ignored, and the user is asked to sign in again;
  • httpOnly: not accessible to page scripts;
  • Secure and SameSite=None: sent over HTTPS only, including inside the Word on the web frame;
  • prefixed with __Host-: the browser binds them to the server's exact host name, without a parent domain. Another application on a neighboring subdomain cannot replace them.

Word on the web ​

In Word on the web, the pane is shown in a frame of the Office page: its cookies are third-party cookies. Word for Windows and Mac are not affected.

BrowserSituation
Chrome, EdgeWorks with the default settings. Blocked in private browsing, if the user blocks third-party cookies, or by a company policy (BlockThirdPartyCookies).
SafariNot supported: third-party cookies blocked by default.
FirefoxNot supported: third-party cookies isolated by default.

If cookies are blocked, the pane shows the "Cookies blocked" error (COOKIES_BLOCKED).

Two servers on the same host name ​

A browser shares the cookies of a host name across all its ports: two Save2ERP servers on the same host name would overwrite each other's sessions. The simplest is to give each one its own host name (e.g. save2erp.my-company.com and save2erp-test.my-company.com). Otherwise, the COOKIE_PREFIX variable adds a different prefix to the cookie names of each server, for example __Host-Test_SWC_WordAddIn_Token.

Changing COOKIE_PREFIX or OAUTH_COOKIE_SIGN_KEY ends all sessions: each user must sign in again.