25 Aug 2022 11:06 AM
we are using browser monitor with recorded clickpath for web application
application uses bearer token for all requests (authorization request header)
recorded clickpath itself works without problems
we would like to add as last event, synthetic javascript event
and within (javascript event) request application, but are wondering if there is a way how to access bearer token (because without bearer token all requests from javascript event are unauthorized)
13 Jan 2023 08:47 AM
in our case no, usually bearer token is accessible in some form in browser storage, but we weren't able to find it or to construct/gather it in any way...
it depends on framework and implementation of framework how token is used... so good luck, but there isn't official or universal solution
13 Jan 2023 08:53 AM
and token isn't only hurdle, content security policy, certificates, file download, local storage for synthetic monitoring, flow control, dependency actions, reexecutions, conditions in action flow ... based on my experience, if you are looking for bearer token, current synthetic monitoring probably isn't ideal, or you should rething what you are doing
19 Jan 2023 01:04 PM
It's not possible to read headers from a page using JavaScript. I take it there are no options to add it as a hidden field etc that JS would have access to? Since you're unable to access the page without it a fetch to the same page wouldn't be an option. Could you just do what you want in an HTTP Monitor?