Hi there, I am building a project using vite, typescript, react, and composedb . when i try to call this session “session = await DIDSession.authorize(authMethod, {client.resources })” it gives me an error of Argument of type ‘{ client: ComposeClient; “”: any; }’ is not assignable to parameter of type ‘AuthOpts’.
Object literal may only specify known properties, and ‘client’ does not exist in type ‘AuthOpts’.ts(2345)
‘,’ expected.ts(1005)
When I try to call it this way, “session = await DIDSession.authorize(authMethod, { resources: client.resources })” gives me an error of
Big integer literals are not available in the configured target environment (“chrome87”, “edge88”, “es2019”, “firefox78”, “safari13.1”)
node_modules/bigint-mod-arith/dist/esm/index.browser.js:232:17: and Vite Error, /node_modules/.vite/deps/@composedb_client.js?v=53fdb2ec optimized info should be defined . Here is the whole function snippet that I am trying to load
const LoadSession = async (authMethod?: AuthMethod): Promise => {
const sessionStr = localStorage.getItem(‘didsession’)
let session
if (sessionStr) {
session = await DIDSession.fromSession(sessionStr)
}
if (authMethod && (!session || (session.hasSession && session.isExpired))) {
session = await DIDSession.authorize(authMethod, { resources: client.resources })
client.setDID(session.did)
localStorage.setItem('didsession', session.serialize())
}
return session;
}