fixes
This commit is contained in:
@@ -23,8 +23,8 @@ export default class AuthClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
awsIamAuth = {
|
awsIamAuth = {
|
||||||
login: async (options: AwsAuthLoginOptions) => {
|
login: async (options?: AwsAuthLoginOptions) => {
|
||||||
const identityId = options.identityId || process.env[MACHINE_IDENTITY_ID_ENV_NAME];
|
const identityId = options?.identityId || process.env[MACHINE_IDENTITY_ID_ENV_NAME];
|
||||||
|
|
||||||
if (!identityId) {
|
if (!identityId) {
|
||||||
throw new Error("Identity ID is required for AWS IAM authentication");
|
throw new Error("Identity ID is required for AWS IAM authentication");
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
import { AxiosError } from "axios";
|
|
||||||
import { InfisicalSDK } from "../src";
|
import { InfisicalSDK } from "../src";
|
||||||
|
|
||||||
const PROJECT_ID = "PROJECT_ID";
|
const PROJECT_ID = "65a02bdfa77d9b8197956da1";
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const client = new InfisicalSDK({
|
const client = new InfisicalSDK({
|
||||||
siteUrl: "http://localhost:8080" // Optional, defaults to https://app.infisical.com
|
siteUrl: "http://localhost:8080" // Optional, defaults to https://app.infisical.com
|
||||||
});
|
});
|
||||||
|
|
||||||
await client.auth().universalAuth.login({
|
await client.auth().awsIamAuth.login({
|
||||||
// For localhost
|
identityId: "84b548bf-6556-40f6-9ef9-838708fae049"
|
||||||
clientId: "CLIENT_ID",
|
|
||||||
clientSecret: "CLIENT_SECRET"
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const allSecrets = await client.secrets().listSecrets({
|
const allSecrets = await client.secrets().listSecrets({
|
||||||
|
|||||||
Reference in New Issue
Block a user