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
importVailablefrom'vailable';// Instead of constapi=newVailable({ ... });api.findResources();// DoVailable.login({ username, password});// Only require to be run somewhere in the application first// AlternativelyValiable.authenticate({ token });Vailable.isAuthenticated()// true/falseVailable.findResources();
We can do this by storing auth outside the class instance as a default fallback if class itself does not have auth + making all methods static (can static methods use this?) – By keeping the class we can then also allow user to make multiple instances of a client for different users (low pri, I'm unsure of the usecase, but there probably is one)
The text was updated successfully, but these errors were encountered:
Use same pattern as e.g. Sentry.
We can do this by storing auth outside the class instance as a default fallback if class itself does not have auth + making all methods static (can static methods use this?) – By keeping the class we can then also allow user to make multiple instances of a client for different users (low pri, I'm unsure of the usecase, but there probably is one)
The text was updated successfully, but these errors were encountered: