Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Retrieving session after magic link signin in Expo - Better Auth
BA
Better Auth
•
12mo ago
•
5 replies
Pander
Retrieving session after magic link signin in Expo
Hi guys
,
We
've set up Better Auth server in our nextjs app and created a successfull authentication setup
. Now we
're trying to use that same setup for our login on our Expo mobile app
. For both the platforms we use a magic link
. I
've followed the setup here
:
https://www.better-auth.com/docs/integrations/expo
with a custom server
.
I
've managed to create a succesful login and deeplinking in the app based on the callback url looking something like this
:
http://localhost:3000/api/auth/magic-link/verify?token=super-secret-token-here&callbackURL=exp://192.168.1.60:8081/--/customer/(tabs)/home
But when the app navigates to that screen and I call auth
.useSession
(
)
, the session is always null
.
Does anyone have a clue on what I
'm missing
?
"
@better
-auth
/expo
"
:
"
^1
.1
.18
"
,
"better
-auth
"
:
"
^1
.1
.18
"
,
`
`
` database
: drizzleAdapter
(db
,
{
provider
:
'pg
'
,
schema
:
{
user
: schema
.user
,
session
: schema
.session
,
account
: schema
.account
,
verification
: schema
.verification
,
}
,
}
)
,
user
:
{
additionalFields
:
{
activeCompanyId
:
{
required
: false
,
type
:
'string
'
,
}
,
type
:
{
type
:
'string
'
,
}
,
language
:
{
type
:
'string
'
,
}
,
dateFormat
:
{
type
:
'string
'
,
}
,
timeFormat
:
{
type
:
'string
'
,
}
,
}
,
}
,
plugins
:
[
expo
(
)
,
magicLink
(
{
disableSignUp
: true
,
sendMagicLink
,
}
)
,
]
,
trustedOrigins
:
[
'
*
'
]
,
/
/
[
'
e
x
p
:
/
/
'
]
,
Expo Integration | Better Auth
Integrate Better Auth with Expo
.
Better Auth
Join
9,988
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Was this page helpful?
Yes
No
Similar Threads
Similar Threads
Issues with magic link session in my Expo app
BA
Better Auth / help
2w ago
Magic Link on Expo
BA
Better Auth / help
6mo ago
can't get session after verify magic link token
BA
Better Auth / help
6mo ago