Pass current auth token using javascript

Hi,
I‘d like to link an internal page using nginx and panel_custom to make it available from externally. I‘ve also a javascript which renders the page in an iframe. this works so far so good.

However, I don‘t want to take care about authenticating users and want to deligate this process to has.

So my question: Is it possible to get user‘s current authorization token using javascript?

thank you!

oliver