I want to automate authentication to this app for a specific user. I've created a Python script to reproduce the authentication workflow based on requests made by the Edge browser.
I've managed to automate authentication right up to the stage where I retrieve the SAML response generated by my IDP.
However, to send this SAML response, the IAP service relies on Firebase. It uses the Javascript method fireauth.oauthhelper.widget.initialize() to submit the SAML response.
<!DOCTYPE html>
<html>
<head>
<meta name=viewport content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="experiments.js"></script>
<script type="text/javascript" src="handler.js"></script>
<script type="text/javascript" nonce="firebase-auth-helper">
var POST_BODY = "SAMLResponse=SAMLRESPONSE_VALUE";
fireauth.oauthhelper.widget.initialize();
</script>
</head>
<body></body>
</html>
How do I submit this SAML response to Firebase via a Python script or API call?