Spring / Spring7 Intermediate to Advanced Interview questions
Why was the OAuth2 password grant removed in Spring Security 7?
The Resource Owner Password Credentials grant requires the client application to collect a user's raw username and password directly and forward them to the authorization server, rather than redirecting the user to authenticate on the identity provider's own page. That design has been flagged as insecure by the OAuth 2.0 Security Best Current Practice guidance for years: it trains users to type credentials into third-party client applications (a textbook phishing pattern), it gives no path to federated identity or single sign-on, and it can't support MFA challenges cleanly since the client, not the authorization server, is the one collecting credentials.
Spring Security 7 removes the grant outright rather than continuing to support it as a discouraged option, pushing every client - including first-party ones - toward the authorization code flow, now paired with PKCE enabled by default. This is consistent with the release's broader theme of shifting risky-but-legal configurations to simply not being available, rather than relying on documentation to steer developers away from them.
More Related questions...