Error code 4001

Hello Team ,
My android application is integrated with okta and is live … All users are able to login with okta and use it.
Recently we could see strange behaviour on one of our user’s end.
His device give 4001 error…
error details - AuthorizationException: {“type”:4,“code”:4001,“error”:“invalid_redirect_uri”}

He can login to other device successfully , I assume it is very much specific to his own device.
His device details - One Plus 11 (android 13)
Our Android app library-

Could you please guide on this ?

@andrea @erik please help

Based on the error you’re seeing, it sounds like the redirect_uri provided in the authorize request (when made from this specific device) is getting malformed somewhere along the way. It would be good to know what redirect_uri is being sent for this user/device and how it differs from the expected one/the one being sent for other users.

Are you able to find a matching error (likely with the message “illegal_redirect_uri_enhanced” in your System Log? If so, you can see what redirectUri was sent when the failure occurred:

Application is not maintaining logs… and user is not even getting log in screen.
Device is not physically available with me to debug.
Any other ways to check it virtually?

I can’t see any failure in logs provided by org okta team though… but no records of login attempt of failed logins also , it seems this scenario has not been captured at okta side

Can you check your System Log for all failures for your OIDC application? I wonder if a different error is being thrown instead, and the system log may have it.

A simple query like this is a good place to start: outcome.result eq "FAILURE" 0oaxxxxxxxx (replacing 0oaxxxxxxxx with your OIDC app’s ID)