kinde-auth-react icon indicating copy to clipboard operation
kinde-auth-react copied to clipboard

Allow passing first_name and last_name in the auth url params when using custom signup

Open raodevendrasingh opened this issue 1 year ago • 1 comments

Prerequisites

What is the problem you’re trying to solve?

Currently there's no way to assign first_name and last_name to a new user during custom signup process.

register({
	authUrlParams: {
		connection_id: import.meta.env.VITE_KINDE_EMAIL_PASSWORD_CONNECTION_ID,
		login_hint: email,
	},
});

The created user object only contains the id and email,

{
    "id": "kp_userid",
    "email": "[email protected]",
    "family_name": undefined,
    "given_name": undefined,
    "picture": undefined,
}

What solution would you like to see?

the authUrlParams should allow passing the first_name and last_name as parameters.

register({
	authUrlParams: {
		connection_id: import.meta.env.VITE_KINDE_EMAIL_PASSWORD_CONNECTION_ID,
		login_hint: email,
		first_name: firstName,
		last_name: lastName
	},
});

After custom signup, the user object should look like this:

{
    "id": "kp_userid",
    "email": "[email protected]",
    "family_name": firstName,
    "given_name": lastName,
    "picture": undefined,
}

Additional information

No response

raodevendrasingh avatar Jul 09 '24 07:07 raodevendrasingh

Hi,

Thanks for this, we have been discussing internally, currently the Kinde auth platform doesn't support passing these properties over. I will see if I can get updates on when we could get these added.

DanielRivers avatar Jul 09 '24 12:07 DanielRivers