You shouldn’t attempt to mutate incoming Request Headers which should be considered immutable.
Instead logout the user before sending an Authentication request otherwise it considers the same Authenticated User is authenticating with an alternative sign in option.
You can “override” the Authorization Header by specifying a non empty (i.e. null
|| “”) in the IRequest.Items
dictionary, e.g:
httpReq.Items[Keywords.Authorization] = "Ignore";
If it doesn’t start with a "Basic " or "Bearer " prefix it will be ignored by the Basic Auth and JWT + Api Key Auth providers.