Communication between app and service

Hello, greetings to all.

I have a question about how can communication between different entities be done.
So, I would have a button in my app that uses Application.OpenExternalURL - this would work well in any of my supported platforms - windows, mac, webgl, ios and android.

This external URL would be some kind of Single Sign On that would give an auth token back to the app. I know that in windows it is possible to implement some command arguments, but on app initialization.

I’ve also considered embedding a web browser in the app but that wouldn’t work I think.
Is there a way to achieve this with some kind of external / internal notification / communication system?
Thanks in advance

I think it would just be a series of REST calls to get the token(s) you need.

There are also some OAuth2 packages on the asset store that might be helpful.

Whatever it is, if you run into issues, this approach may be useful:

Networking, UnityWebRequest, WWW, Postman, curl, WebAPI, etc:

And setting up a proxy can be very helpful too, in order to compare traffic: