mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-17 21:59:09 +00:00
get redirect_uri from get_tokens_url_params
This commit is contained in:
@@ -218,9 +218,18 @@ export class InputsClientService implements OnModuleInit {
|
||||
...secrets,
|
||||
...credentials,
|
||||
});
|
||||
const get_tokens_url_params_obj = JSON.parse(
|
||||
get_tokens_url_params_string,
|
||||
);
|
||||
let get_tokens_url_params_obj: Record<string, any> = {};
|
||||
try {
|
||||
get_tokens_url_params_obj = JSON.parse(
|
||||
get_tokens_url_params_string,
|
||||
);
|
||||
} catch (error) {
|
||||
throw new HttpException(
|
||||
'Erro transformando get_tokens_url_params',
|
||||
400,
|
||||
);
|
||||
}
|
||||
const { redirect_uri } = get_tokens_url_params_obj;
|
||||
for (const key in get_tokens_url_params_obj) {
|
||||
const value = get_tokens_url_params_obj[key];
|
||||
requestParams.append(key, value);
|
||||
@@ -238,6 +247,7 @@ export class InputsClientService implements OnModuleInit {
|
||||
const responseKey = get_tokens_set_response[key];
|
||||
credentialsTokens[key] = data[responseKey];
|
||||
}
|
||||
redirect_uri.redirect_uri = redirect_uri;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user