Crital bug - {"message":"User not found in Auth0"} & { message: 'Unable to verify authorization request state.' }

I have an application built in NodeJs using Auth0 Login and User Management services. Auth0 Login is working properly for our Staging URL but it’s not working for Production one.

Noticed an info it throws in Server Console:
info { message: ‘Unable to verify authorization request state.’ }

And getting below error on browser:
{“message”:“User not found in Auth0”}

I am using below Redirect URL for Staging (similar but not real):
https://site.esspl.work/api/auth/callback

and below Redirect URL for Production (similar but not real):
https://site.com.au/api/auth/callback

assistance would be greatly appreciated.

Hi @daniel.a.radovich,

Welcome to the Auth0 Community.

Sorry to hear you are running into problems. I am going to look into these things for you. Could you DM me your tenant names? Both your staging and production. And if possible, could you take a moment and record a HAR file for me?

Thanks,
Dan

@dan.woda Hey mate, This is Daniel Radovich again, using the account of my client. I couldn’t log into my daniel.a.radovich account ?

How do I direct message you via this account? thanks.

i got the same issue when upload the sample code to herokuapp.

// Perform the final stage of authentication and redirect to previously requested URL or ‘/user’

router.get('/callback', **function** (req, res, next) {

passport.authenticate('auth0', **function** (err, user, info) {

**if** (err) { **return** next(err); }

**if** (!user) { console.log('not user ' + JSON.stringify(info)); **return** res.redirect('/login'); }

req.logIn(user, **function** (err) {

**if** (err) { **return** next(err); }

**const** returnTo = req.session.returnTo;

**delete** req.session.returnTo;

res.redirect(returnTo || '/main');

});

})(req, res, next);

});

the error is returned from above.

Error is like below :

2019-09-11T17:33:46.246573+00:00 heroku[web.1]: State changed from starting to up

2019-09-11T17:35:39.530636+00:00 heroku[router]: at=info method= GET path=“/callback?code=Ey0FHVgnFEU8Y_nW&state=dGVzdGVuY2yybkmoR2YWx1ZQ” host=auth-pie-ai.herokuapp.com request_id=b2d38c53-dde0-491d-a01b-5e041e9a3853 fwd=“210.6.31.105” dyno=web.1 connect=0ms service=56ms status=302 bytes=249 protocol=http

2019-09-11T17:35:39.510155+00:00 app[web.1]: not user {“message”:“Unable to verify authorization request state.”}

2019-09-11T17:35:39.532437+00:00 app[web.1]: GET /callback?code=Ey0FHVgnFEU8Y_nW&state=dGVzdGVuY2yybkmoR2YWx1ZQ 302 36.487 ms - 56

please advise the solution.

@horse.pie.model Can you take a look at this and see if the solution there works:

https://github.com/auth0/passport-auth0/issues/70

1 Like