I was trying to authenticate users logging in with exchangeAuthorizationCode
, but it was not working with a Public IAM Client
and with a Confidential IAM Client
this is prompted:
After passing the clientId
and clientSecret
as user/pass, the requests start to add the Authorization: Basic ...
header. When I try to include this header as override, it also does not work.
In these lines, the headers from this.conf.headers
are replaced
const config = {
...this.conf,
headers: {
'Device-Id': deviceId,
'Device-Name': platform.name ? platform.name.toString() : '',
'Device-Os': platform.os ? platform.os.toString() : '',
'Device-Type': SdkDevice.getType()
}
}
It should be:
const config = {
...this.conf,
headers: {
'Device-Id': deviceId,
'Device-Name': platform.name ? platform.name.toString() : '',
'Device-Os': platform.os ? platform.os.toString() : '',
'Device-Type': SdkDevice.getType(),
...this.conf.headers
}
}