December 14, 2016

How to Track your Users over Several Domains?

Track users over different domains is a recurrent issue while developing a substantial web solution.

Track users over different domains is a recurrent issue while developing a substantial web solution. Use cases are countless:

  • authenticate customers over different websites (Google-like single sign-on);

  • cross-sell based on what they have visited previously on other websites;

  • customize user experience;

  • analytics.

Let’s say we are trying to build a single authentication between two domains: and We are considering the following scenario, following a specific user named Jack:

username jack

How can we get to know that its users are already logged in on

Setting cross-domain cookies?

The first approach that comes to mind is to set a cookie on users’ web browser as soon as they are authenticated on this website and to use these cookies later on At first glance, this solution seems staight-forward: setting a cookie is easy and can be achieve within a few lines of codes using PHP or JS.

<?php setcookie("loggedIn", true);

Unfortunately, here we encounter our first problem: There is an important web concept called ‘Same origin policy’ that prevents one website to access another website resources through user’s browser.

Amongst other things, this rule specify that cookies are specific to a given domain. Nor is able to read related cookies, nor is capable of writing its own on

And this for user security purposes: you don’t want a malicious page to get access session cookies.

So, how do we deal with this problem?

Read the full article here.

wrong google account

Custom Nested and Validated Forms With React

A guide to build your own complex validated react forms.

Edge detection, tutorial, knowledge

Edge Detection in Opencv 4.0, A 15 Minutes Tutorial

This tutorial will teach you, with examples, two OpenCV techniques in python to deal with edge detection.

logo loopback

Enhance Your Loopback Models with Custom mixins

This article puts light on the very useful mixins option of your model.json declaration file.