Need help: managing distinctId for logout where logout screen on seperate website

  • 7 February 2020
  • 1 reply

Userlevel 1
Badge +2

We have our sign in and sign up process (OpenId endpoint) on a different website than our mobile app or website SaaS.

I'm uncertain on the best way to manage `reset`ing the distinctId to cater different user sign up on the same device.


Here are my thoughts so far.

  1. User goes to sign in page - identity server generates the random distinctId
  2. When user signs in - identity server aliases our userId
  3. Before it sends the user to the web app/mobile app - identity server identify random distinctId to alias
  4. Mobile/web app gets loaded with user profile - mixpanel sdk generates random distinctId AND we `identify` it with our userId
  5. **Now I hope we have the funnel mapped between the two apps (identity and SaaS)**
  6. User clicks log out - webapp/mobile `reset`s
  7. Webapp/mobile sends user back to identity server
  8. Identity Server sets a new cookie with a new distinctID to be loaded to the front-end (sign in page)


The bit I'm struggling the most is step 8.

I'm using the JS sdk on the identity front-end and using its data for back-end work.

But now i need to have the back-end data set on the front-end and hoping to overwrite the cookie that was generated by the SDK. How do I go about doing that.