Article sections

    Social media login for Facebook and Google can sometimes have difficulties with WebView-based approaches. There are many ways to implement these social media logins for your website, so the exact issue depends on how the login feature is implemented on your website.

    Here is a guide to troubleshooting the cause of Facebook and/or Google login problems with your unique website + WebViewGold app template pairing 🙂

     

    • If the login link opens in-app (as it should) but has errors/problems:
      (e.g., Google showing the 403 Error, or it says that the browser doesn’t support the login feature, etc)

     

      • Use the Custom User-Agent feature:
        • Variables in the Config file:
          • iOS: useragent_iphone, useragent_ipad.
          • Android: USER_AGENT
        • It is recommended that you search and use the latest user agent for Safari on iOS iPhone and/or iPad.
          • iOS: https://www.whatismybrowser.com/guides/the-latest-user-agent/safari
          • Android: https://www.whatismybrowser.com/guides/the-latest-user-agent/chrome
          • You may need to use different user agents for Facebook and Google login, fiddle until you find one that suits 🙂

     

    • If the link opens in a new tab/browser (when it shouldn’t):
      (The login link should open in-app so that the login gets registered in the app)

     

      • Try the following Config options according to your app needs:
        (Most login problems are easy to fix with these configuration options,)
        • It could be classified as a special link (eg. with a target=’_blank’). Set the following variables to false if that suits your app needs
          • iOS: openspecialurlsinnewtab
          • Android: OPEN_SPECIAL_URLS_IN_NEW_TAB
        • These login links would commonly (but not always) classify as external links. Set the following variables to like so if that suits your app needs:
          • iOS: openallexternalurlsinsafaribydefault = false
          • Android: EXTERNAL_URL_HANDLING_OPTIONS = 0
        • iOS-specfic option:
          • You can use the safariblacklist feature. Add domains related to your login pages to this list, so they do not open in Safari.
        • If these options succeed in opening your login link in-app and you still have errors:
          • Also, use the Custom User-Agent feature (described above).

     

      • If none of these options succeeds in opening your login link in-app:
        • Use the Social Media Login Helper tool:
          • Variables in the Config file:
            • iOS:
              • google_login_helper_triggers
              • facebook_login_helper_triggers
            • Android:
              • GOOGLE_LOGIN_HELPER_TRIGGERS
              • FACEBOOK_LOGIN_HELPER_TRIGGERS
          • To trigger the helper, you need to list the URL prefixes that load during the login.
          • Examples of common URL prefixes loaded during login:
            • Google: “https://accounts.google.com/”, “https://accounts.google.com/o/oauth2/”
            • Facebook: “https://m.facebook.com”, “https://www.facebook.com”

     

    If your issue still persists after trying these methods, please feel free to contact our support team! 🙂

    in WebViewGold for AndroidWebViewGold for iOS