Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Cannot use multiple instances of R6API #71

@BadCoder1337

Description

@BadCoder1337

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions