MAUI WebView save / autofill login data

Andy 45 Reputation points
2023-12-13T08:10:42.5+00:00

On my .NET MAUI project (Android) I'm using a WebView to access a webpage, wehere I'm able to log in on a login form. Now what I'm looking for is a way to autofill the username / password fields, when I already logged in in another session, so saving the username and password like a regular browser would do. I found this but I don't know how to access it. Is there an easy solution for my problem?

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

Answer accepted by question author
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,151 Reputation points Microsoft External Staff
    2023-12-14T02:48:22.1666667+00:00

    Hello,

    CoreWebView2 works with the Edge browser for the Windows platform. For Android, you can not call the methods of it.

    For scenarios related to user login, the more recommended solution is to let the browser remember the account through cookies. MAUI provides an official API for setting cookies.

    Please refer to Set cookies for more detailed information.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.