Keep CLI and App session separated

Hi!

We’re using auth0 device authorization flow to log in user from a CLI client using social identity providers, storing the token in the client’s machine. (Node.js)

I’ve noticed that Auth0 will store a cookie in the browser used for the device code verification, and this is cookie is also detected by our dashboard app, so if the user logs in through CLI, will be also logged in in dashboard app (Both CLI and Dashboard app communicates to the same API).

I have two questions for two different scenarios:

  • How can we keep CLI login from our Dashboard login separated?
  • In the case that we keep using the same session for both CLI/Dashboard, how can we logout the user without opening a windows tab in browser? I guess this second option is not possible since we would need to delete the cookies stored to complete the logout, unless there’s a way to invalidate the session.

Thanks!