Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Google authentication not working on my Nextjs app - Better Auth
BA
Better Auth
•
9mo ago
•
2 replies
thepreakerebi
Google authentication not working on my Nextjs app
I
've tried implementing the google authentication on my nextjs app but I keep getting the error below
:
POST
/api
/auth
/sign
-in
/social 500 in 525ms
⨯ TypeError
: Cannot read properties of undefined
(reading
'handler
'
)
at
[project
]
/app
/api
/auth
/
[
.
.
.all
]
/route
.ts
[app
-route
]
(ecmascript
)
(app
/api
/auth
/
[
.
.
.all
]
/route
.
t
s
:
5
:50
)
at Object
.
<anonymous
>
(
.next
/server
/app
/api
/auth
/
[
.
.
.all
]
/route
.
j
s
:
1
2
:9
)
3
| import
{ auth
} from
'
@
/lib
/auth
'
;
4
|
5
| export const
{ GET
, POST
}
= toNextJsHandler
(auth
.handler
)
;
|
^
{
page
:
'
/api
/auth
/sign
-in
/social
'
}
Better Auth
Join
9,988
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
[Idea solicit] Pass authentication to another NextJS app after a logging in on a separate NextJS app
BA
Better Auth / help
12mo ago
Nextjs middleware not working
BA
Better Auth / help
11mo ago
Seperate API authentication for NextJS
BA
Better Auth / help
8mo ago