Implementing SSO in desktop client?

I have a long standing desktop app (written in C++), with it’s own login for on prem users (outside of auth0). Recently, I have spun up a SPA using Auth0’s universal login (the new one).

Both work great, but now I would like to be able get an access token from auth0 in the desktop app for users that have accounts in both apps. The login creds for the SPA and desktop apps are different.

The only solution I can think of at this point is to have a custom hook that triggers on sign in to the SPA to send tokens to the desktop app for SPA users linked to desktop users. This seems like it violates best practices.

Any help on how to implement SSO for a desktop app in c++, so that it works similarly to the Universal login.