diff --git a/zh-cn/application-dev/reference/apis/js-apis-appAccount.md b/zh-cn/application-dev/reference/apis/js-apis-appAccount.md index 0ea9524afcc0c976dd27bd7619856030c42bbc77..6e714eef9a7906766d90d571698013cda528de16 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-appAccount.md +++ b/zh-cn/application-dev/reference/apis/js-apis-appAccount.md @@ -1523,6 +1523,8 @@ getAuthenticatorCallback(sessionId: string): Promise<AuthenticatorCallback> **示例:** ```js + import featureAbility from '@ohos.ability.featureAbility'; + const appAccountManager = account_appAccount.createAppAccountManager(); featureAbility.getWant().then((want) => { var sessionId = want.parameters[account_appAccount.Constants.KEY_SESSION_ID]; diff --git a/zh-cn/application-dev/reference/apis/js-apis-osAccount.md b/zh-cn/application-dev/reference/apis/js-apis-osAccount.md index 46c10df342225adfa126579be98ce0719b20317e..45c039b15889fe2191b9c5fc921d6cf36d6ecd19 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-osAccount.md +++ b/zh-cn/application-dev/reference/apis/js-apis-osAccount.md @@ -2326,7 +2326,7 @@ registerInputer(inputer: IInputer): boolean; **示例:** ```js let pinAuth = new account_osAccount.PINAuth(); - let password = new Uint8Array([0, 0, 0, 0, 0]; + let password = new Uint8Array([0, 0, 0, 0, 0]); let result = pinAuth.registerInputer({ onGetData: (pinSubType, callback) => { callback.onSetData(pinSubType, password); @@ -2509,7 +2509,7 @@ updateCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void; } }); userIDM.openSession((err, challenge) => { - userAuth.auth(challenge, credentialInfo.credType, account_osAccount.AuthTrustLevel.ATL_1, { + userAuth.auth(challenge, credentialInfo.credType, account_osAccount.AuthTrustLevel.ATL1, { onResult: (result, extraInfo) => { if (result != account_osAccount.ResultCode.SUCCESS) { return; @@ -2571,8 +2571,9 @@ cancel(challenge: Uint8Array): number; **示例:** ```js let userIDM = new account_osAccount.UserIdentityManager(); - let challenge = 1; - let cancelresult = userIDM.cancel(challenge); + let challenge = new Uint8Array([0]); + let result = userIDM.cancel(challenge); + console.log("cancel result: " + result); ``` ### delUser8+