This commit is contained in:
Daniel Hougaard
2024-09-24 00:01:44 +04:00
parent 16de3e38e8
commit cb07d82a18
2 changed files with 2 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ export default class AuthClient {
throw new Error("Identity ID is required for AWS IAM authentication"); throw new Error("Identity ID is required for AWS IAM authentication");
} }
const iamRequest = await performAwsIamLogin(this.baseUrl, identityId, await getAwsRegion()); const iamRequest = await performAwsIamLogin(await getAwsRegion());
const res = await this.apiClient.apiV1AuthAwsAuthLoginPost({ const res = await this.apiClient.apiV1AuthAwsAuthLoginPost({
apiV1AuthAwsAuthLoginPostRequest: { apiV1AuthAwsAuthLoginPostRequest: {

View File

@@ -31,9 +31,7 @@ export const getAwsRegion = async () => {
} }
}; };
export const performAwsIamLogin = async (baseUrl: string, identityId: string, region: string) => { export const performAwsIamLogin = async (region: string) => {
const body = "Action=GetCallerIdentity&Version=2011-06-15";
AWS.config.update({ AWS.config.update({
region region
}); });