We use Azure B2C on our ASP.NET website to authenticate our web users.
We are building our app in Flutter, and need the same user credentials to work across both the app and the website.
I have hit my head against a brick wall trying to implement the Azure B2C login web page inside the app, trying various WebView packages, and the flutter_custom_tabs package.
Webviews are not allowed by Google and Facebook for 3rd party auth (although the user agent can be hacked, but this doesn’t seem like a good approach).
Chrome Custom Tabs blocks redirects back to the app’s URI scheme. (msauth://), and the only hack to get around it is to build a custom page with a link that can be clicked on by the user to redirect them, which is a horrible UX.
From what I understand, it is best to take a native approach, build a email/password login form inside the app UI, and for Google/Facebook auth use native flutter packages for this.
Am I on the right track here or what would be the best approach?