Closed soralee closed 1 month ago
You can take a look on our direct sign-in docs to see if it can help. We currently do not have a guide for direct sign-in, but we are going to work on providing guide and update SDK to boost developers experience.
If you are using React SDK, try this;
const { signIn } = useLogto();
<button
type="button"
onClick={() => {
void signIn({
redirectUri: 'http://your.redirect.uri',
directSignIn: { method: 'social', target: 'google' },
});
}}
>
Sign in
</button>
Thanks for all the replies. I realized the issue was a TypeScript error on my part, and updating to version 3.0.14 resolved it.
I'll close this now.
Thanks again for all the help!
What problem did you meet?
I am using the useLogto hook in my React application and I would like to know if it is possible to set the signIn function to enable the directSignIn property.
Describe what you'd like Logto to have
Could you please provide guidance or an example on how to achieve this?