In the earlier post, we have checked how to store user account details on Hypi’s low code backend.
Account data type can also save Password
associated with a username.
In built data type called Password saves the password details. The password value
gets saved with encryption. Password expiry status value can also be stored.
Let’s save Password details.
mutation {
upsert(values: { Password: [{ value: "abcdefg", expired: false }] }) {
id
}
}
#result
{
"data": {
"upsert": [
{
"id": "01gemgpq0hm5mpwxdywx5b5426"
}
]
}
}
Retrieve the password details using hypi.id
{
get(type: Password, id: "01gemgpq0hm5mpwxdywx5b5426") {
... on Password {
hypi {
id
created
updated
}
value
expired
}
}
}
# result
{
"data": {
"get": {
"hypi": {
"id": "01gemgpq0hm5mpwxdywx5b5426",
"created": "2022-10-05T16:47:17Z",
"updated": "2022-10-05T16:47:17Z"
},
"value": "[redacted]",
"expired": false
}
}
}
The password value gets displayed redacted due to encryption.