uni-id-users PERMISSION_ERROR permission verification failed

Problem description: After integrating the uni-starter component and logging in with WeChat, this error is reported.

Check the uni-id-users.schema.json table and find that the permission is not set.

Solution: Set permission

 "permission": {
        "read": true,
        "create": "'CREATE_UNI_ID_USERS' in auth.permission",
        "update": "doc._id == auth.uid || 'UPDATE_UNI_ID_USERS' in auth.permission",
        "delete": "'DELETE_UNI_ID_USERS' in auth.permission"
    }

The above permission is automatically generated when the uni-starter official component is created. In the testing phase, it is also possible to set all to true for convenience. Wait until the function is developed before setting permissions.

"permission": {
        "read": true,
        "create": true,
        "update":true,
        "delete": true
    }

Guess you like

Origin blog.csdn.net/weixin_40841731/article/details/130124481