worldwide-asset-exchange / waxjs

Javascript API for integration with the WAX Cloud Wallet.
MIT License
127 stars 103 forks source link

Can't log in with temporary accounts #233

Closed 3dkrender closed 3 months ago

3dkrender commented 3 months ago

When I try to log in from an app using a temporary account I get the message "User declined to share their user account" when call to login()

I can see the temporary account created in MyCloudWallet and in the app I have enabled the flag 'returnTempAccounts'

https://github.com/worldwide-asset-exchange/waxjs/blob/fe2ae4863b654514c0cf78cfe31a7838334d3100/src/WaxSigningApi.ts#L292C3-L308C6

private async receiveLogin(event: { data: any }): Promise<boolean> {
    const {
      verified,
      userAccount,
      pubKeys,
      whitelistedContracts,
      isTemp,
      createData,
      avatar_url: avatarUrl,
      trustScore,
      proof
    } = event.data;
    let isProofVerified = false;
    let proofDetails = null;
    if (!verified) {
      throw new Error("User declined to share their user account");
    }

Is there any verification issue with temporary accounts?

3dkrender commented 3 months ago

Update

Does the 'verified' option refer to email verification?

If so, during the account creation process there is no option to request a verification email (at least I haven't seen one, so if there is one, it doesn't seem very intuitive or accessible) nor is one automatically sent. If the email address needs to be verified, the verification email should be sent automatically without any request.

3dkrender commented 3 months ago

Fixed with the backend update