fix bug in salesforce auth middleware