Can I include just one button instead of Sign in / Sign up?
Is there some hack to this? If so, is it better to include "just" sign up? I want to have one simple screen in my app like this
6 Replies
How would you recommend to approach this?
Also, the custom sign in via authUrlParams does not work
<Button
primary
className="w-full"
onClick={() => {
getKindeClient().login({
authUrlParams: {
connection_id: "conn_01924c8c55a768835bde1727574b08ae",
},
});
}}>
Login with google
</Button>
Heres what I have and instead of bringing me to Google, the regular sign in page shows up
Heres what getKindeClient does"
const kindeClient: KindeClient = await createKindeClient({
client_id: import.meta.env.VITE_KINDE_CLIENT_ID,
domain: import.meta.env.VITE_KINDE_DOMAIN,
redirect_uri: import.meta.env.VITE_KINDE_REDIRECT_URI,
on_error_callback: () => {
useUserStore.setState({
user: null,
isFetching: false,
token: null,
loginState: null,
});
},
on_redirect_callback: async (user: KindeUser) => {
const token = await kindeClient.getToken();
useUserStore.setState({
user: user ? mapKindeUserToUser(user) : null,
isFetching: false,
token,
loginState: {
loggedin: true,
},
});
},
});
const user = kindeClient.getUser();
const token = await kindeClient.getToken();
useUserStore.setState({
user: user ? mapKindeUserToUser(user) : null,
isFetching: false,
token,
loginState: {
loggedin: !!user,
},
});
export const getKindeClient = (): KindeClient => kindeClient;
Does anyone know why the authUrlParams with Google social sign in does not work? 🫠
Did you make sure in your kinde dashboard you've switched on "Use your own sign-up and sign-in screens" in the application ?
No I didnt! Nice, thanks!
This is amazing!
I just wish it had a screenshot in the documentation, I completely ignored it 🤦♂️
Thank you for the support
Glad it worked for you !
The team is always working on making the docs better i'll let them know about your experience !