For anybody wondering this doesn’t work with strapi.db.query. You’ll have to use the Entity Service API like this:
const profile = await strapi.entityService.update("plugin::users-permissions.user", user.id, {
data: {
confirmed,
email,
firebase_provider: providers[sign_in_provider],
profile: {
id: user.profile.id,
bio: "test"
},
},
populate: ["profile"],
})