You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your effort in enabling the oci in javascript.
I've come across a slight issue when trying to implement the SDK in my Next.js project (in server action).
I just can't get my head around on how to configure the credentials using the config files.. which I assume it has something to do with path / incompatibility.
At the moment I'm using SimpleAUthenticationDetailsProvider as the alternative, but if possible, I'd rather use the config files as I believe it to be safer option.
For anyone wondering my current implementation, see below.
"use server";
import * as objectstorage from "oci-objectstorage";
import * as common from "oci-common";
// do not import common from "oci-common"
const tenancy: string = process.env.ORACLE_TENANCY as string;
const user: string = process.env.ORACLE_USER as string;
const fingerprint: string = process.env.ORACLE_FINGERPRINT as string;
// const passphrase: string | null = null; // optional parameter
const privateKey: string = process.env.ORACLE_PEM as string;
const region: common.Region = common.Region.AP_MELBOURNE_1; // Change to appropriate region
const provider = new common.SimpleAuthenticationDetailsProvider(
tenancy,
user,
fingerprint,
privateKey,
null,
region
);
// using the client with provider
const client = new objectstorage.ObjectStorageClient({
authenticationDetailsProvider: provider,
});
The text was updated successfully, but these errors were encountered:
Hi Team,
Thanks for your effort in enabling the oci in javascript.
I've come across a slight issue when trying to implement the SDK in my Next.js project (in server action).
I just can't get my head around on how to configure the credentials using the config files.. which I assume it has something to do with path / incompatibility.
At the moment I'm using SimpleAUthenticationDetailsProvider as the alternative, but if possible, I'd rather use the config files as I believe it to be safer option.
For anyone wondering my current implementation, see below.
The text was updated successfully, but these errors were encountered: