fix device flow for iam
@@ -16,9 +16,13 @@ char* generateDeviceCodePostData(const struct oidc_account* a) {
char* generateDeviceCodeLookupPostData(const struct oidc_account* a,
const char* device_code) {
- return generatePostData(OIDC_KEY_CLIENTID, account_getClientId(a),
- OIDC_KEY_GRANTTYPE, OIDC_GRANTTYPE_DEVICE,
- OIDC_KEY_DEVICECODE, device_code,
+ return generatePostData(
+ OIDC_KEY_CLIENTID, account_getClientId(a), OIDC_KEY_CLIENTSECRET,
+ account_getClientSecret(
+ a), // actually not needed, but iam currently does not support basic
+ // auth for device code look up
+ OIDC_KEY_GRANTTYPE, OIDC_GRANTTYPE_DEVICE, OIDC_KEY_DEVICECODE,
+ device_code,
// OIDC_KEY_RESPONSETYPE, OIDC_RESPONSETYPE_TOKEN,
NULL);
}
