Expo - can't login with social provider

I'm trying to use Expo plugin to login with Github provider, when I click the button the redirect is working correctly but I'm getting session back πŸ˜• Here are the logs from useSession hook:
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": true, "isRefetching": false}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": true, "isRefetching": true}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": false, "isRefetching": false}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": true, "isRefetching": true}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": false, "isRefetching": false}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": true, "isRefetching": true}
(NOBRIDGE) LOG {"data": {"redirect": true, "url": "https://github.com/login/oauth/authorize?response_type=code&client_id=123&state=4hbPIPGNOYvNEqIj4W80dMpmXRq1&scope=user%3Aemail&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth%2Fcallback%2Fgithub"}, "error": null}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": false, "isRefetching": false}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": true, "isRefetching": false}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": true, "isRefetching": true}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": false, "isRefetching": false}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": true, "isRefetching": true}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": false, "isRefetching": false}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": true, "isRefetching": true}
(NOBRIDGE) LOG {"data": {"redirect": true, "url": "https://github.com/login/oauth/authorize?response_type=code&client_id=123&state=4hbPIPGNOYvNEqIj4W80dMpmXRq1&scope=user%3Aemail&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth%2Fcallback%2Fgithub"}, "error": null}
(NOBRIDGE) LOG {"data": null, "error": null, "isPending": false, "isRefetching": false}
The backend is not throwing any error, but the redirect inside the app is not working. How can I fix it? (the email method is working fine) I'm on 1.1.10
8 Replies
Unknown User
Unknown Userβ€’2mo ago
Message Not Public
Sign In & Join Server To View
Bart ⚑
Bart ⚑OPβ€’2mo ago
Nope, I've never got my session back from the social provider πŸ˜• Hey @cercio @bekacru any updates on this?
bekacru
bekacruβ€’2mo ago
Check if the cookies are stored on the storage your provided
Bart ⚑
Bart ⚑OPβ€’2mo ago
I'm now able to get the session back, but my callbackURL is not working inside the app πŸ˜•
bekacru
bekacruβ€’2mo ago
Are you using expo router?
Bart ⚑
Bart ⚑OPβ€’2mo ago
yes
bekacru
bekacruβ€’2mo ago
I think someone else also reported the same issue. I’ll check if it’s something to fix from better auth side
Bart ⚑
Bart ⚑OPβ€’2mo ago
okay, please let me know when you get something. When I try just clicking scheme://path it's working correctly and navigates me to the correct path so i guess it's something on the better auth side

Did you find this page helpful?