Username-Password Flow Disabled Salesforce Exception

Exception: Username-Password Flow Disabled Resolution: In Salesforce Setup, “Allow OAuth Username-Password Flows” should be enabled in “OAuth and OpenID Connect Settings” to fix this error/exception.