Kbral
Kbral
WWasp
Created by ComputO on 1/6/2025 in #đŸ™‹questions
Is there a way to autofill the username based on the link in the login and signup forms.
@kapa.ai it works with email ans password too?
18 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
React Router Future Flag Warning: React Router will begin wrapping state error
key @miho can u help me here?
42 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
React Router Future Flag Warning: React Router will begin wrapping state error
@kapa.ai this 'verifyPassword' function foes not exists
42 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
React Router Future Flag Warning: React Router will begin wrapping state error
@kapa.ai I've done at this way, but how can i validate if the current password is valid?
export const updateProfile = async (data: {
name: string,
currentPassword: string,
newPassword: string,
confirmPassword: string,
email: string,
}, context) => {
if (data.newPassword && data.newPassword !== data.confirmPassword) {
throw new HttpError(400, 'Passwords do not match');
}

if (data.currentPassword && data.newPassword) {
const providerId = createProviderId('email', data.email);
const authIdentity = await findAuthIdentity(providerId);

if (!authIdentity) {
throw new HttpError(400, "Unknown user")
}

// Here i want to validate the current password

const providerData = deserializeAndSanitizeProviderData<'email'>(authIdentity.providerData)

// Updates the password and hashes it automatically.
await updateAuthIdentityProviderData(providerId, providerData, {
hashedPassword: data.newPassword,
})
}
};
export const updateProfile = async (data: {
name: string,
currentPassword: string,
newPassword: string,
confirmPassword: string,
email: string,
}, context) => {
if (data.newPassword && data.newPassword !== data.confirmPassword) {
throw new HttpError(400, 'Passwords do not match');
}

if (data.currentPassword && data.newPassword) {
const providerId = createProviderId('email', data.email);
const authIdentity = await findAuthIdentity(providerId);

if (!authIdentity) {
throw new HttpError(400, "Unknown user")
}

// Here i want to validate the current password

const providerData = deserializeAndSanitizeProviderData<'email'>(authIdentity.providerData)

// Updates the password and hashes it automatically.
await updateAuthIdentityProviderData(providerId, providerData, {
hashedPassword: data.newPassword,
})
}
};
42 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
React Router Future Flag Warning: React Router will begin wrapping state error
@kapa.ai but the findAuthIdentity doesn't exists too
42 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
React Router Future Flag Warning: React Router will begin wrapping state error
@kapa.ai the function createProviderId is not working
42 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
React Router Future Flag Warning: React Router will begin wrapping state error
@kapa.ai how to compare the passwords? If i want to do it customizable
42 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
React Router Future Flag Warning: React Router will begin wrapping state error
@kapa.ai is there a way to validate if a password that i'm typing matches with the database?
42 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
React Router Future Flag Warning: React Router will begin wrapping state error
@kapa.ai and what about the localhost error?
42 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
Update user password
Doesn't options to hash?
25 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
Update user password
@kapa.ai So, if i want to: - Edit name - Edit email - Insert the current password - Insert the new password - Confirm the new password How could i do it?
25 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
Update user password
@kapa.ai from where is this secure-password?
25 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
Update user password
@kapa.ai and if i want to insert the user name too?
25 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
Update user password
@kapa.ai How can i'm using current password to validate, how can i do it?
25 replies
WWasp
Created by Kbral on 1/12/2025 in #đŸ™‹questions
Customize Login Text
@kapa.ai i'm saying, change the text that is fixed as: "Create a new account"
9 replies