Преглед изворни кода

Make password optional in UserAuthParams (#152)

Brian V пре 3 година
родитељ
комит
2349b25515
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      gramjs/client/auth.ts

+ 1 - 1
gramjs/client/auth.ts

@@ -17,7 +17,7 @@ export interface UserAuthParams {
     phoneCode: (isCodeViaApp?: boolean) => Promise<string>;
     /** optional string or callback that should return the 2FA password if present.<br/>
      *  the password hint will be sent in the hint param */
-    password: (hint?: string) => Promise<string>;
+    password?: (hint?: string) => Promise<string>;
     /** in case of a new account creation this callback should return a first name and last name `[first,last]`. */
     firstAndLastNames?: () => Promise<[string, string?]>;
     /** a qrCode token for login through qrCode.<br/>