1

I try to package a pwa app with Google Sign In wkwebview for ios14. Pwa works well but Google Signin fails.

In the first page, I am trying to do goole authentication via sfsafariviewcontroller. the problem is that i am never redirected to the wkwebview after authenticating.

I read lot of things about this subject but i'm completely lost.

Actually, i put this link on my google sign in button in my pwa.

    https://accounts.google.com/o/oauth2/v2/auth?client_id=[client_id]&redirect_uri=com.googleusercontent.apps.[client_id]:/oauth&response_type=code&scope=profile%20email&prompt=select_account
  • I have declared the google urls schemes in xcode

  • I put this on ViewController let safariVC = SFSafariViewController(url: navigationAction.request.url!) safariVC.delegate = self present(safariVC, animated: true)

  • I put this function in Scenedelegate and i catch well the url callback func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {print(URLContexts)}

  • I put this function in AppDelegate but it never call func application( _ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:] ) -> Bool { return true}

It has been 3 days since reading the forum looking for an answer without success. Can anyone help? Many thanks in advance. Mat

0 Answers0