Google Connection failing in Electron and Angular 4 with Lock 10.15

Hello.

I have an Electron + Angular 4 application which I am trying to wire with auth0, and I am not having success with the Google connection.

(Using Lock 10.15.)

I have

  • tried both Native and SPA Client Types
  • set Allowed Callback URLs
  • set CORS
  • walked through multiple posts
  • reviewed multiple repos
  • read auth0-lock issues
  • tried standard and hash location strategy quickstarts
  • tried multiple options configurations

What am I missing? I suspect it is something obvious.

Cheers,
Geoffrey


Google Fails in Application
!](https://storage.googleapis.com/qxflmk-dev-public/GoogleButtonNoResponse.gif)

But shows it works in the auth0 logs:
!](https://storage.googleapis.com/qxflmk-dev-public/auth0-log.png)

Twitter Behaves as Expected
!](https://storage.googleapis.com/qxflmk-dev-public/TwitterFine.gif)


Blog Post

Standard Quickstart (Angular 2)

https://auth0.com/docs/quickstart/spa/angular2/01-login

HashLocationStrategy (Angular 2)

https://auth0.com/docs/quickstart/spa/angular2/01-login#use-with-hashlocationstrategy

Forum

https://auth0.com/forum/t/unable-to-login-when-running-app-in-electron/4565/7

Repos

https://github.com/faxad/cartify/blob/upgrade/4-0-0/src/app/shared/auth.service.ts

The problem with Google login is that after Lock 10.5 we dropped explicit support for electron in Auth0.js additionally google now blocks web views from logging in. This specific use-case falls under PKCE you can either use something like what I’m doing in GitHub - darkyen/pkce-demos: A bunch of PKCE demos, using Auth0.js to extend the 🔐 to multiple providers! (instead of listening to open-url you can create an express server and listen on it for callback) alternatively you can use https://github.com/oidc/AppAuth-JS (they have an example in /src/node_app) with Auth0 as oidc provider and your client_id as client_id.

Thank you @abhishek.hingnikar.

I will look into both those solutions.

Cheers,
Geoffrey

We re-added the handlers, you might be able to do this if your force popup mode (or redirect: false).

There seems to be a bug with this approach though. We are working on it.

Thank you.

If I can help, please let me know.

Hi Abhishek,

I am looking at the PKCE demo approach.

First, nice slide deck. The information is clear and understandable even for someone as dense as me!

Second, are your comments about adding handlers and bug in the approach specific to PKCE or AppAuth-JS?

Repos (updated)
https://github.com/faxad/cartify/blob/master/src/app/shared/auth.service.ts