Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Third Party login #11

Open
SameerMohsinIdeas opened this issue Jan 9, 2024 · 0 comments
Open

Third Party login #11

SameerMohsinIdeas opened this issue Jan 9, 2024 · 0 comments

Comments

@SameerMohsinIdeas
Copy link

SameerMohsinIdeas commented Jan 9, 2024

Hi I am using the same example for my scenario below is the code: ``handleClick() async {
final defaultUserAgent = await InAppWebViewController.getDefaultUserAgent();
if (kDebugMode) {
print("Default User Agent: $defaultUserAgent");
}

String? newUserAgent;
if (Platform.operatingSystem.toUpperCase() == "ANDROID") {
  newUserAgent = defaultUserAgent.replaceFirst("; wv)", ")");
} else {
  newUserAgent = "$defaultUserAgent Safari/604.1";
}

if (kDebugMode) {
  print("New User Agent: $newUserAgent");
}
await webViewController?.setSettings(
    settings: InAppWebViewSettings(userAgent: newUserAgent));
await goHome();

}
onLoadStart: (controller, url) async {
if (url.toString().startsWith(
"https://accounts.google.com/o/oauth2/v2/")) {
print("=>in if block of google auth");
handleClick();
print("=>handleClick");
}
},

``

After clicking on google login I get blank screen. As the normal behavior on the web is that after login it goes to the accounts information page. Let me know if I am doing something wrong or if there is any modification that I can do to achieve normal behavior. Looking for a quick respinse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant