Initiating sessions outside the webgl and then allowing Unity to use same login session

We have a use case where a login for a site has already happened before the Unity content is loaded. This Unity content then needs to use common Https APIs but without asking user to login again.
So a session Id could be passed through js to Unity but maybe too insecure. A short-lived token could be passed to Unity and used to login to the APIs in Unity to get a new token securely.

What techniques do people use? To a none web dev!

This is a solved problem.

I know what token authentication is but from within the Unity webgl you have not got the token for an already started session outside of it. So how to pass to Unity safely?

It is describe here: WebGL taking login data from website it is embedded on? - Unity Forum If passing an existing token through js on the web page is safe then that is one way