Error with Google login on custom domain

Your suggestion have helped me a make some progress, but I am now getting a ‘invalid token/ state does not match error’.

I’ll try to summarise the situation.

With the following configuration ( domain: "<tenant>.<region>.auth0.com"), both username-password login and google login redirect to http://localhost:1337/callback but both result in a “invalid token/ state does not match" error:

var params = Object.assign({
        domain: "<tenant>.<region>.auth0.com", 
        clientID:  '<clientID>',
        redirectUri: 'http://localhost:1337/callback',
        responseType: 'token id_token',
        overrides: {
		      __tenant: "<tenant>",
		      __token_issuer: "<tenant>.<region>.auth0.com"
      	}
      }, config.internalOptions);

(Changing __tenant to "<tenant>.<region>.auth0.com" results in the same error)

With the following configuration ( domain: '<customDomain>') , username-password login works but google login has the “redirect_uri_mismatch” error:

var params = Object.assign({
        domain:   '<customDomain>',
        clientID:  '<clientID>',
        redirectUri: 'http://localhost:1337/callback',
        responseType: 'token id_token',
        overrides: {
		      __tenant: "<tenant>",
		      __token_issuer: "<tenant>.<region>.auth0.com"
      	}
      }, config.internalOptions);

The hosted page is accessed by a call to angularAuth0.authorize() and auth0 is initialised with

angularAuth0Provider.init({
    clientID: '<clientID>',
    domain: '<customDomain>',
    responseType: 'token id_token',
    redirectUri: 'http://localhost:1337/callback',
    scope: 'openid profile email'
 });