The issue is with how you are passing the onClick prop to your ViniButton component:
<ViniButton type="button" fill="light" onClick={connectWith('google')}>
Se connecter avec Google
</ViniButton>
Here, connectWith('google') is calling the function immediately when the component renders, instead of passing a function to be called when the button is clicked. This is why the button is "clicked" automatically on page load.
Solution:
Wrap the function call in an anonymous function so it is only called when the button is actually clicked:
<ViniButton
type="button"
fill="light"
onClick={() => connectWith('google')}
>
Se connecter avec Google
</ViniButton>
This way, connectWith('google') will only be executed when the button is clicked.
Summary:
onClick={connectWith('google')} → calls the function immediately (wrong)
onClick={() => connectWith('google')} → passes a function to be called on click (correct)