docs: fix code format (#1611)

This commit is contained in:
KinfeMichael Tariku
2025-03-02 00:58:10 +03:00
committed by GitHub
parent 8ca13802e9
commit bd30868470

View File

@@ -14,18 +14,17 @@ description: VK ID Provider
<Step>
### Configure the provider
To configure the provider, you need to import the provider and pass it to the `socialProviders` option of the auth instance.
```ts title="auth.ts"
import { betterAuth } from "better-auth"
import { betterAuth } from "better-auth";
export const auth = betterAuth({
socialProviders: {
vk: { // [!code highlight]
clientId: process.env.VK_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.VK_CLIENT_SECRET as string, // [!code highlight]
},
},
})
socialProviders: {
vk: { // [!code highlight]
clientId: process.env.VK_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.VK_CLIENT_SECRET as string, // [!code highlight]
},
},
});
```
</Step>
<Step>
@@ -33,15 +32,16 @@ description: VK ID Provider
To sign in with VK, you can use the `signIn.social` function provided by the client. The `signIn` function takes an object with the following properties:
- `provider`: The provider to use. It should be set to `vk`.
```ts title="auth-client.ts"
import { createAuthClient } from "better-auth/client"
const authClient = createAuthClient()
import { createAuthClient } from "better-auth/client";
const authClient = createAuthClient();
const signIn = async () => {
const data = await authClient.signIn.social({
provider: "vk"
})
}
const data = await authClient.signIn.social({
provider: "vk",
});
};
```
</Step>