Open ma10as opened 7 months ago
Hi @ma10as thanks for reporting. Can you run Meteor.enableVerbose()
and see what the console.info prints regarding the token? The onLogin
will only run of the current token is found. I just want to make sure this is not an issue with the library. Also - which version of @meteorrn/core
is currently installed at your project?
Hi @jankapunkt
I ran the Meteor.enableVerbose()
function and the result is INFO Connected to DDP server.
I use @meteorrn/core : "2.7.1"
@ma10as I fixed a few things in the library and released 2.8.0
, can you try this one first, please? Apart from that I will try to reproduce and see if the issue is actually related with the expo file router.
@jankapunkt I will try to update to 2.8.0
and i will come back later today👍🏻
Hi @jankapunkt i now updatet to 2.8.0
Now I am stuck on the loading page and it is not leaving it after reload.
The Meteor.enableVerbose()
now returns 3 results
INFO Connected to DDP server.
,
INFO User._loginWithToken::: token: ERtGkUfUhmiZBZ4GBfiPD_3F-FYspj5V4a_fT3yr4wG
and
INFO User._handleLoginCallback::: token: ERtGkUfUhmiZBZ4GBfiPD_3F-FYspj5V4a_fT3yr4wG id: Z8HiZDuqkzujLTzQT
.
And it looks like the useReducer functions runs with the type RESTORE_TOKEN
but the token: null
Describe the bug I have used the Auth logic from this repo for some time now without problems. Now i try to switch from React Navigation to Expo router v3 (file-based routing), and i ran into a issue.
On first load of the app the app doesn't run the handleOnLogin() function from useAuth. The app is never leaving the isLoading state before being reloaded.
I'm trying to follow this instruction https://docs.expo.dev/router/reference/authentication/#example-authentication-context
app/_layout.jsx
app/(app)/_layout.jsx
useAuth.jsx
What could the problem be?