Oauth error invalid_request: The redirect_uri is missing

I am encountering an OAuth error: invalid_request: The redirect_uri is missing.
I have added the correct redirect URLs to the whitelist in the partner accounts. The issue occurs when a user logs in for the first time; they are not redirected to the specified URL. However, if the user attempts to log in again, the redirection works as expected.

HI @Aousaf_Sulaman

What scopes are you requesting, and do you have permissions set up that cover all the scopes?