You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support just asked us to open a ticket out of that discussion for visibility. We would love to get an answer on this, as the docs are not providing clear guidelines. Best would be to actually get an example of login/logout process with two API tokens (one with JWT and one without)
Originally posted by apfelfabrik February 15, 2024
Hey everyone,
We're allowing users to open our app and sign in optionally at a later point in time. What seems to work well is the push notification device registration for anonymous users using a JWT-less API token when we initialize the SDK. Now it seems we're running into some race conditions when the user signs up/in. We need to unregister the anonymous user's device from push notifications, we need to initialize the SDK again with the JWT-based API token, and we need to register the device again for the now authenticated user.
What would be the correct or recommended order of react native SDK API calls to achieve this, including calls to initialize with the individual API keys?
Please excuse if this is a well-documented case, I couldn't find anything on this in the docs even though I think this should be rather common practice considering user management in mobile apps.
Cheers,
Martin.
The text was updated successfully, but these errors were encountered:
Discussed in #531
Support just asked us to open a ticket out of that discussion for visibility. We would love to get an answer on this, as the docs are not providing clear guidelines. Best would be to actually get an example of login/logout process with two API tokens (one with JWT and one without)
Originally posted by apfelfabrik February 15, 2024
Hey everyone,
We're allowing users to open our app and sign in optionally at a later point in time. What seems to work well is the push notification device registration for anonymous users using a JWT-less API token when we initialize the SDK. Now it seems we're running into some race conditions when the user signs up/in. We need to unregister the anonymous user's device from push notifications, we need to initialize the SDK again with the JWT-based API token, and we need to register the device again for the now authenticated user.
What would be the correct or recommended order of react native SDK API calls to achieve this, including calls to
initialize
with the individual API keys?Please excuse if this is a well-documented case, I couldn't find anything on this in the docs even though I think this should be rather common practice considering user management in mobile apps.
Cheers,
Martin.
The text was updated successfully, but these errors were encountered: