I believe that we are experiencing a bug. We are using the hosted login page. With the following auth configuration in new Auth0Lock(config.clientID, config.auth0Domain, { ... }):
Error after parsing with this.auth0.parseHash((err, authResult) => {
{error: "invalid_token", errorDescription: "`state` does not match."}
The states are really different. When our app navigates to hosted login the state is TAq_UNSQtX0NUqweU2Ldx_nxO6zo44Mu, after the successful login the callback contains HZUjsntmgZVem9FyN5did0Oq7KlJJJxK. We are not modifying state by any means.
It works if we use auth: params: config.internalOptions instead of auth: params: { prompt: 'select_account'} . But we need select_account to let users pick from multiple gmail accounts.
The affected client ID on localhost isW0fAQBgC5h4bEhJchWEEGsyxxXN0cr93.
If we do the same on the staging client with ID 0FahBRRJJtYnK7lCoGHduwHBF4sbHecZ we receive a different error:
Doesn’t seem to work for me. Same result whether I put it in the options object or not. Logging the options object to console confirms that it contains { prompt: “select_account” } in addition to the other values.
Like the original post said, if I replace the options object with only { prompt: “select_account” }, then it works. (But I get errors later on because I’m missing state).
Actually, I was using incognito mode to test, which means I’m only going to have that one Google account available. I guess the account picker window is never shown if you only have 1 account available.
It’s kinda not working for me as I would expect too. It’s not always letting me pick the account (even with more gmail accounts). But it’s up to Google, not to Auth0.