Device Authorization Flow fails; "Looks like something went wrong!"

I’m trying to test the Device Authorization Flow for a NodeJS CLI app using the Auth0 example app.

I’ve configured a device application in my Auth0 tenant, I’ve launched the CLI sample, and I’ve entered its client ID, my tenant’s domain, the audience for one of my APIs, and selected a scope like offline_access or openid from the list. It pops open my browser, I log in through Okta SSO, and then I’m redirected to an error page (“Looks like something went wrong!” with a tracking ID like 23d0e2efeea19326e8d0). I expected to enter a scope from the API that belongs to the audience I provided, but even if I modify the script to use one of the scopes defined on my API, I get the same result. The CLI script eventually times out trying to poll for the tokens that should’ve been created by the browser flow.

Is there a trick to this? Is the Device Auth Flow sample app out of date? Does it work for other people?

Hi @geometric . It feels as if something might be misconfigured at the login page level, or maybe a domain mismatch between the start of the flow and where your Okta connection is sending the results.

For further details, send me a .HAR file (Generate and Analyze HAR Files) via DM capturing the full browser interaction and I’ll take a look.

1 Like

Hi @geometric . Thanks for sending the .HAR file. As I suspected, there’s a mismatch of domains used in the flow:

  1. The original request (from the CLI) goes to your dev tenant’s domain (e.g. acme-dev.auth0.com)
  2. acme-dev.auth0.com shows the login screen. The user action causes the flow to go to Okta
  3. The user logs in to Okta. Okta sends the response to another Auth0 domain (e.g. acme.auth0.com) which is not where the flow started (acme-dev.auth0.com).
  4. acme.auth0.com receives the unexpected response from Okta, and you get the “Looks like something went wrong!” error.

In order to fix this, configure your Okta setup to send the response back to acme-dev.auth0.com. :+1:

3 Likes

Thanks for helping on this one Nico!

Yes, thanks for your help! Now I’ve got some direction on where to dig. :+1:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.