No authentication sent with httpRequestWithAuthentication call

When I call await this.helpers.httpRequestWithAuthentication.call(this, 'httpBasicAuth', options), I get a Forbidden - perhaps check your credentials? error.
If I manually add this before the request, it works fine:

options.auth = {
	password: credentials.password as string,
	username: credentials.user as string
}

But this should be handled by httpRequestWithAuthentication automatically? Having the same problem when trying with oAuth2Api.
No idea what could be missing…

hello @ChrisHof

That’s because the field for username in the httpBasicAuth is user, not username

It is in there with user? It’s working if I add options.auth like described above, but I thought I shouldn’t have to manually add anything to httpRequestWithAuthentication to get authentication to work?

When you set the auth object, your ‘user’ field is different from what you get from the credentials.
image