A credential (client secret, API key, password, bearer token) is hard-coded as a value in res/values/strings.xml.
Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Why this matters
String resources are compiled verbatim into the APK and are recovered in seconds by unzipping/decompiling the app, so any secret placed here is effectively public (CWE-798). AI-generated Android code drops secrets into strings.xml because it is the "official" place for constants.
A public mobile client should hold no client secret at all (use PKCE). For an unavoidable key, inject it at build time via BuildConfig / Gradle properties or fetch it from a backend at runtime, never commit it as a string resource. Note: a public client_id and OAuth scope list are not secrets and are intentionally not flagged.
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.xml.android.hardcoded-secret-strings -- <reason>