mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 12:27:44 +00:00
docs: fix code format (#1611)
This commit is contained in:
committed by
GitHub
parent
8ca13802e9
commit
bd30868470
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user