Auth0 "Custom Social" for Google fails with "Invalid user id."

I setup Auth0 and Google credentials and had it working using the free trial period within Auth0. this is for a side-project so I need to switch to the free tier “Custom Social” Auth0 logins. I followed these instructions but end up with the error “Invalid user id” in both the Auth0 test page and the app I had working with the Social Login that is pre-build by Auth0.

In GCP console I created a “Client ID for Web application”

  • Authorised JavaScript origins =
  • Authorised redirect URIs =

GCP “OAuth consent screen”

  • Publishing status = Testing
  • User type = External

App Registration (just setting this to get it working)

  • Application home page =
  • Application privacy policy link =
  • Application Terms of Service link =
  • Authorised domain =
  • Your non-sensitive scopes = /auth/
  • Test users = my email address

It generates


Over in Auth0 I created a new Custom Socal Login

  • Authorization URL =
  • Token URL =
  • Scope = openid email (spaces set on)
  • Client ID = GCP_CLIENT_ID
  • Client Secret = GCP_CLIENT_SECRET
  • Fetch User Profile Script
function(accessToken, ctx, cb) {
  var p = {
    accessToken: accessToken,
    id_token: ctx.id_token

I also tried Connect Apps to Generic OAuth2 Authorization Servers using as the endpoint in the function

Pres test, Login screen displayed, select test account, then the error is displayed

I solved it, see Stack Overflow