I'm just getting started with better-auth and have what might be a basic question.
I want to generate a sign in link on my server. What is the correct API method to do that?
e.g. I want a URL for a "sign in to google" button that I can include in my server side template (either in a form as the form action, or as a link URL)
all client calls can be access on the auth.api and the options you would usally pass to the client call like:
const data = await authClient.signIn.social({ provider: "google", idToken: { token: // Google ID Token, accessToken: // Google Access Token }})
const data = await authClient.signIn.social({ provider: "google", idToken: { token: // Google ID Token, accessToken: // Google Access Token }})
becomes
const data = await auth.signInSocial({ headers: headers, // you need to pass in the request headers body:{ provider: "google", idToken: { token: // Google ID Token, accessToken: // Google Access Token } }})
const data = await auth.signInSocial({ headers: headers, // you need to pass in the request headers body:{ provider: "google", idToken: { token: // Google ID Token, accessToken: // Google Access Token } }})