
Context: I am developing an application in Power Pages. The site is a single page where certain activities can be carried out. Currently, the code is completely custom (I opened Visual Studio Code, deleted all the default HTML, CSS, and JS, and inserted my code - exploiting some Power Pages functionalities, especially user management).
This application makes calls (using simple JS - fetch APIs) to external REST APIs outside of Power Pages (managed on Azure Function).
What I would like to do is pass the user's token to the APIs to evaluate whether that connected user can/cannot call that API and in any case also give to the BE an idea of which user is logged in for some other functionalities.
How can I do this? Is there any flag to activate in Power Pages? Is there perhaps a field like {{user.emailaddress1}}?
Hi @lcristo-avvale1 ,
On your webpage, you can type Liquid and JS together at the HTML of the content page as shown below
If this post helps you with your problem, please mark this answer as Accepted Solution.
If you like my response, please give it a Thumbs Up.