@arkadiuminc/sdk 2.8.1 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,12 +27,25 @@ interface AuthUIManagerContract {
27
27
  export declare class Auth {
28
28
  private userProfileReader;
29
29
  private authUIManager;
30
+ private authProblem;
30
31
  constructor(userProfileReader: UserProfileReaderContract, authUIManager: AuthUIManagerContract);
31
32
  init(env: ApiEnv): Promise<void>;
32
33
  isUserAuthorized(): Promise<boolean>;
33
34
  getUserProfile(): Promise<UserProfile | null>;
34
35
  onAuthStatusChange(observer: any): () => void;
35
36
  openAuthForm(): Promise<void>;
37
+ /**
38
+ * this method should be exercised on the game side to let game know about
39
+ * issues that happen during auth outside the scope of direct API calls
40
+ */
41
+ onAuthProblemChange(observer: any): Promise<void>;
42
+ /**
43
+ * this method should be internally called every time a problem happens
44
+ * outside the scope of direct API calls
45
+ * @private
46
+ * @param error string
47
+ */
48
+ raiseOnAuthProblem(error: string): void;
36
49
  onOpenAuthForm(observer: any): () => void;
37
50
  static getArenaApi(backendApi: Backend, host: IHost, rpcProvider: RpcProvider): Auth;
38
51
  static getGameApi(backendApi: Backend, host: IHost, rpcProvider: RpcProvider): Auth;
@@ -35,7 +35,15 @@ export declare class NakamaProvider implements NakamaProviderContract {
35
35
  private initNakamaSessionViaFingerprint;
36
36
  private initNakamaSessionViaEagle;
37
37
  private onAuthBootstrap;
38
+ /**
39
+ * this method is called when the user is logged in
40
+ * CAUTION: this method is called from eagle login status change, therefore it can't throw
41
+ */
38
42
  private onEagleLogIn;
43
+ /**
44
+ * this method is called when the user is logged out
45
+ * CAUTION: this method is called from eagle login status change, therefore it can't throw
46
+ */
39
47
  private onEagleLogOut;
40
48
  private getAccount;
41
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkadiuminc/sdk",
3
- "version": "2.8.1",
3
+ "version": "2.9.1",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/pkg/arkadium-sdk.umd.js",