Add ensureValidRpId helper to validate and correct rp.id for WebAuthn operations, preventing authentication failures when the configured rp.id doesn't match the current hostname. Also add OAuthProvider type and fix type casting in LoginPage.