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?

@Liam-Shopify I have the same issue. It’s working fine if the user is logged in already, however if the user is not logged in, your redirection loses the redirect_uri.
The scope does not matter, but here is my scopes:

read_locations,read_shopify_payments_payouts,write_draft_orders,read_draft_orders,read_all_orders,write_inventory,write_products,write_orders,read_products,read_product_listings,write_product_listings,read_fulfillments,write_fulfillments,read_assigned_fulfillment_orders,write_assigned_fulfillment_orders,read_third_party_fulfillment_orders,write_third_party_fulfillment_orders,read_merchant_managed_fulfillment_orders,write_merchant_managed_fulfillment_orders,read_shopify_payments_accounts,read_customers

Hi @Jean-Sebastien_Goupi

Are you building the URL as is described here: Implement authorization code grant manually