migration: "Failed to transfer resource 'xxxxxx:user' with message 'Password hash is missing'"
- 0
- Self Hosted
- Web
cc @bradleySchofield
Is that user an OAuth user?
Yes it is.
Ah, I see
in that case it should even attempt to assign a password hash
I'm currently working on quite a few things for migrations to fix it up and make it alot better, hopefully I'll have an early version of the library soon and I'll whip up a small script you can run
Thank you, hoping to complete it as soon as possible.
Sorry, is there any chance you can send me the JSON of what the user looks like? Please remove all the personal information. I just need to see the schema and whatever is null/undefined
From browser developer tool internet panel, I just got these information:
{
"$id": "64b38f96879f2d4b3254",
"$createdAt": "2023-07-16T06:35:02.867+00:00",
"$updatedAt": "2023-12-21T06:44:12.240+00:00",
"name": "",
"registration": "2023-07-16T06:35:02.867+00:00",
"status": true,
"passwordUpdate": "2023-07-27T08:15:33.299+00:00",
"email": "myemail@gmail.com",
"phone": "",
"emailVerification": true,
"phoneVerification": false,
"prefs": {},
"avatar": "https://xxx"
}
This is my personal infomation, some other users may had not updated their password, so "passwordUpdate" field may be null.
What request are you getting this response from? this is kind of unexpected...I expect to see hash, password, and hashOptions
Also, avatar isn't one of our attributes π§
Here's the expected structure: https://github.com/appwrite/appwrite/blob/1.3.7/src/Appwrite/Utopia/Response/Model/User.php
It may not be possible to obtain complete information through the API, but it can be confirmed that almost all users complete identity authentication through oauth2, so they have not set or changed passwords, and there may not have a password and hash.
You should be able to with the users API... Appwrite uses the same APIs for the migration
I am using the nodejs version of SDK, how to obtain complete user information, including passwords and hashes.
What version of the node SDK?
"node-appwrite": "^9.0.0"
Yup, list users should return the password and whatnot: https://github.com/appwrite/sdk-for-node/blob/68e46fd078183c05d36c31caa2a3979076ae4f83/index.d.ts#L883
There:
{
"$id": "65796258d6ece0f7435f",
"$createdAt": "2023-12-13T07:50:48.880+00:00",
"$updatedAt": "2023-12-13T07:51:27.800+00:00",
"name": "",
"password": null,
"hash": "argon2",
"hashOptions": {
"type": "argon2",
"memoryCost": 2048,
"timeCost": 4,
"threads": 3
},
"registration": "2023-12-13T07:50:48.880+00:00",
"status": true,
"passwordUpdate": "",
"email": "mailname@domainname.com",
"phone": "",
"emailVerification": true,
"phoneVerification": false,
"prefs": {
"quotas": "{}"
}
}
Cc @bradleySchofield
thats, uhhh, unusual. You shouldn't have any hash options or hash at all for that matter if there isn't a password
how does this user sign in?
Ah, I see looks like I make an asumption here where I shouldn't
Hello heroic men, Is there any progress now π
Sorry, we've been off for the Christmas holidays but please rest assured I'm still working on it
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...