I need to create a different session with non-default Ubi-AppId to interact with another domain of endpoints.
Example code:
const friendsApi = new R6API(credentials)
const chatApi = new R6API({ ...credentials, ubiAppId: OVERLAY_APP_ID })
const friendsApiAuth = await friendsApi.getAuth()
const chatApiAuth = await chatApi.getAuth()
console.log(friendsApiAuth, chatApiAuth)
But because of global variables in auth.ts and other places I cannot construct 2nd R6API instance. getAuth from both instances gives the same object which is impossible since session endpoint is non-idempotent.
I need to create a different session with non-default
Ubi-AppIdto interact with another domain of endpoints.Example code:
But because of global variables in
auth.tsand other places I cannot construct 2nd R6API instance. getAuth from both instances gives the same object which is impossible sincesessionendpoint is non-idempotent.