admin管理员组文章数量:1123379
How do you pass (POST-)data to a physical webpage from within a NET MAUI application?
I would like to navigate to a webpage. The website is of the same origin as the app, meaning users can log into the website using the same credentials they use in the app. For a seamless user experience I would like to automatically authenticate the user on this website, so they don't have to enter their credentials again. After all, I already have the credentials/token/key in the app.
Using HttpClient
I can authenticate users through an API, but this client doesn't have graphical components to physically present a website. Therefore, I have to either open the browser or use MAUI WebView
instead to display the website.
For example, I have to open the webpage in a browser:
await Browser.Default.OpenAsync(
new Uri(";),
BrowserLaunchMode.SystemPreferred);
Or create a WebView
to display the webpage there:
<WebView
Source="; />
But how would I go about automatically authenticating the user there? Is there a way to POST data to the browser or to the MAUI WebView
? Or can I somehow use HttpClient
to create a session and use this session in the browser/Webview? Is there any accepted workflow for this?
本文标签: cHow to pass data to a physical webpage from NET MAUI applicationStack Overflow
版权声明:本文标题:c# - How to pass data to a physical webpage from NET MAUI application? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736566827a1944716.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论