Merge pull request #1302 from better-auth/fix/ui-patch

ui patch
This commit is contained in:
KinfeMichael Tariku
2025-01-30 07:49:47 +03:00
committed by GitHub
2 changed files with 17 additions and 7 deletions

View File

@@ -26,14 +26,23 @@ export function ThemeToggle() {
<span className="sr-only">Toggle theme</span>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => setTheme("light")}>
<DropdownMenuContent className="rounded-none" align="end">
<DropdownMenuItem
className="rounded-none"
onClick={() => setTheme("light")}
>
Light
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setTheme("dark")}>
<DropdownMenuItem
className="rounded-none"
onClick={() => setTheme("dark")}
>
Dark
</DropdownMenuItem>
<DropdownMenuItem onClick={() => setTheme("system")}>
<DropdownMenuItem
className="rounded-none"
onClick={() => setTheme("system")}
>
System
</DropdownMenuItem>
</DropdownMenuContent>

View File

@@ -17,7 +17,7 @@ Single Sign-On (SSO) allows users to authenticate with multiple applications usi
<Step>
### Add Plugin to the server
```ts title="auth.ts"
```ts title="auth.ts"
import { betterAuth } from "better-auth"
import { sso } from "better-auth/plugins/sso";
@@ -49,11 +49,11 @@ Single Sign-On (SSO) allows users to authenticate with multiple applications usi
</Step>
<Step>
### Add the client plugin
```ts title="auth-client.ts"
import { createAuthClient } from "better-auth/client"
import { ssoClient } from "better-auth/client/plugins"
const authClient = createAuthClient({
plugins: [ // [!code highlight]
ssoClient() // [!code highlight]
@@ -145,6 +145,7 @@ const res = await authClient.signIn.sso({
or you can specify the domain:
```
const res = await authClient.signIn.sso({
domain: "example.com",