This project demonstrates how when calling an endpoint asynchronously from apex with a continuation, with a named credential, salesforce seems to ignore the "generate authorization header" option and still sends the header.
- Deploy this project to a scratch org
- Update the Named Credential called RequestBin to a valid Request Bin URL
- Create a new Account record
- On that Account record test the "Call Sync" and "Call Async" buttons, compare headers sent
Most relevant Code is in the TestCallouts Aura Component, and the TestCalloutsController Apex class.