How to implement email verification in a webview Flutter app without opening it in a browser, and fix Google sign-in issues? Answered

Post author
Yannick Caron

Question: My app is running as a downloadable webview app on both ios & android. I was thinking about implementing email verification, but the issue I see is the following: the button that shows up in the verification email will probably open my app in the normal browser of the user and not in the webview app they have on their phone. Is my assumption correct, if so, is there a way around this?

Comments

9 comments

  • Comment author
    Memberstack Team
    • Official comment

    In your case, Script #191 could help by identifying when the verification link is being opened in the device’s default browser instead of your app’s webview, and then prompting the user with a clear message to continue in the correct environment.

    That said, #191 doesn’t directly solve the deeper issue of email verification links defaulting to the system browser. Your assumption is correct: when a user clicks a link in an email, iOS and Android typically open it in the native browser, not in your app’s webview. The long-term solution would be to implement deep linking or universal links so that verification links are associated with your app and open directly inside it.

  • Comment author
    Chukwudi

    Hi Yannick,

    Your assumption is correct. When a user clicks on a link in an email, it typically opens the default web browser on their device, rather than directly opening your app.

    One way I believe should work for you is associating your app with a specific domain (in this case, memberstack.com), you can configure your app to handle links that belong to that domain. When the user clicks on the verification link, if your app is installed and the domain is associated correctly, it should open your app directly.

    To implement this, you'll need to configure your app's manifest or settings files accordingly and handle the incoming URLs in your app's code. The specific steps may vary depending on the platform (iOS or Android) and the framework (Flutter, React Native, etc) you're using.

    Tyler Bell Josh Lopez Do you have any suggestions?

    0
  • Comment author
    Nihat Avcı

    Hello everyone,

    We have a webview flutter app, Google sign in is not working since we integrated. Desktop and mobile are okay, but the app doesn't work, is there anyone facing that issue? We have outh 2.0 approval, I really get confused what to do and how to fix that issue.

    Website: scrolli.co
    Android:https://play.google.com/store/apps/details?id=com.scr.scrolli&hl=tr
    IOS: https://apps.apple.com/tr/app/scrolli/id6475323109

    0
  • Comment author
    A J

    Hey Nihat Avcı, found that Google discourages embedded WebViews for security reasons.

    The closest solution I found for these type of errors is that clients prefer to hide the social auth buttons for such webview apps. 🤔

    0
  • Comment author
    Nihat Avcı

    Is there any way to open Google sign in not another tab, but in same tab? That might be the solution.

    0
  • Comment author
    A J

    Hmm, I found this thread which seems to be addressing the similar issue. Hope it gives you some rough idea for an approach to solve this.

    0
  • Comment author
    Nihat Avcı

    Oh I saw it just now, will check it immediately thanks 🙏

    It says it's impossible to do it with webview app :(

    0
  • Comment author
    A J

    Yeah I was not able to find a resource which shares how to avoid the error within a webview, almost all sources I checked suggested to open the app in external browser 😔

    0
  • Comment author
    Nihat Avcı

    We'll change into native app probably, I mean how hard is to build it, actually how hard is to convert webflow into native app? Ant idea?

    0

Please sign in to leave a comment.