The redirect URI (where the response is returned to) has to be registered in the Identity Provider (IDP) as the error indicates you haven't done that or haven't configured it correctly. For example to resolve this issue when using Google as IDP, Go to the console for your project and look under API Access. You should see your client ID & client secret there, along with a list of Authorized redirect URIs. If the URI you want isn't listed, click edit settings and add the URI to the list.
Please ensure to enter the URI under Authorized redirect URI and not the Authorized JavaScript origins as below screenshot. Authorized redirect URI is where users will be redirected to this path after they have authenticated with Google.