Try to upgrade next-auth
This commit is contained in:
parent
8851457248
commit
13f431c3ec
3 changed files with 9 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
|
import { signIn } from '@auth/nextjs/client'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
|
|
||||||
export function Login() {
|
export function Login() {
|
||||||
|
|
@ -7,7 +8,7 @@ export function Login() {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
className="inline-flex w-full items-center justify-center rounded border border-zinc-800 bg-white h-8 px-4 -my-1.5 text-sm leading-6 tracking-tight text-zinc-900 transition-colors ease-in-out hover:bg-zinc-100 disabled:cursor-not-allowed disabled:opacity-50"
|
className="inline-flex w-full items-center justify-center rounded border border-zinc-800 bg-white h-8 px-4 -my-1.5 text-sm leading-6 tracking-tight text-zinc-900 transition-colors ease-in-out hover:bg-zinc-100 disabled:cursor-not-allowed disabled:opacity-50"
|
||||||
onClick={() => router.push('/api/auth/signin')}
|
onClick={() => signIn('github')}
|
||||||
>
|
>
|
||||||
<span className="font-medium">Login</span>
|
<span className="font-medium">Login</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import { ThemeToggle } from '@/components/theme-toggle'
|
import { ThemeToggle } from '@/components/theme-toggle'
|
||||||
import { type Session } from '@auth/nextjs/types'
|
import { type Session } from '@auth/nextjs/types'
|
||||||
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'
|
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'
|
||||||
import { signIn } from '@auth/nextjs/client'
|
import { signOut } from '@auth/nextjs/client'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
import { useRouter } from 'next/navigation'
|
import { useRouter } from 'next/navigation'
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ export function UserMenu({ session }: UserMenuProps) {
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
<DropdownMenu.Item
|
<DropdownMenu.Item
|
||||||
className="py-2 px-3 hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-colors duration-200 cursor-pointer text-xs focus:outline-none"
|
className="py-2 px-3 hover:bg-zinc-200 dark:hover:bg-zinc-800 transition-colors duration-200 cursor-pointer text-xs focus:outline-none"
|
||||||
onClick={() => router.push('/api/auth/signout')}
|
onClick={() => signOut()}
|
||||||
>
|
>
|
||||||
Log Out
|
Log Out
|
||||||
</DropdownMenu.Item>
|
</DropdownMenu.Item>
|
||||||
|
|
|
||||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
|
|
@ -1,4 +1,8 @@
|
||||||
lockfileVersion: '6.0'
|
lockfileVersion: '6.1'
|
||||||
|
|
||||||
|
settings:
|
||||||
|
autoInstallPeers: true
|
||||||
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
overrides:
|
overrides:
|
||||||
'@auth/core': 0.0.0-manual.527fff6c
|
'@auth/core': 0.0.0-manual.527fff6c
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue