If the goal is to reset only the OTP device (not full credentials), the correct approach is:
Create a custom Required Action Provider.
Implement logic that:
Removes the user’s OTP credential
(user.credentialManager().removeStoredCredentialById(...))
Or resets the configured OTP credential type.
Register it in META-INF/services/org.keycloak.authentication.RequiredActionProviderFactory
Deploy as a custom SPI.
Trigger it using:
kc_action=your-custom-action
appended to the existing login URL.
This avoids touching client_id entirely and works within the existing client context.
You can trigger it via:
/realms/{realm}/protocol/openid-connect/auth?
client_id=existing-client
&response_type=code
&kc_action=reset-otp
No need for a second client.
Let me know if it works
With Regards