mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-04 06:57:12 +01:00
migrate auth from next-auth to better-auth with magic link support
Replace next-auth with better-auth, adding magic link email login as the primary auth method and GitHub OAuth as an optional social provider. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,4 +10,4 @@ if (process.env.SITE_URL) {
|
||||
|
||||
export function getBaseURL(): string {
|
||||
return URL
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,14 @@
|
||||
import { SessionProvider } from 'next-auth/react'
|
||||
import Auth from '../components/auth'
|
||||
|
||||
// This is the HOC
|
||||
function withAuth(WrappedComponent: React.FunctionComponent) {
|
||||
// Return a new component
|
||||
function withAuth({ session, ...pageProps }) {
|
||||
function withAuth(pageProps) {
|
||||
// Render the WrappedComponent with additional props
|
||||
return (
|
||||
<SessionProvider session={session}>
|
||||
<Auth>
|
||||
<WrappedComponent {...pageProps} />
|
||||
</Auth>
|
||||
</SessionProvider>
|
||||
<Auth>
|
||||
<WrappedComponent {...pageProps} />
|
||||
</Auth>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user