ive worked with email authentication provider, works perfect. but what really upset me is that i could not transfer my existing user to another project if i needed to. therefore im creating my own custom authentication. but after trying it out, i figure inconsistancy with custom login:
returning document id of linked users collection does not seems to point to the _id of the linked custom data “users” collection. im getting some weird id that does not point to both users._id nor users.uid
@James_Tan1 Today, the custom authentication and custom user data are a bit separate. In order to achieve what you are looking for you would need to use an Auth Trigger which could then map the document id to the currentUser’s id. From there you would then refresh the custom user data on the client side Realm SDK and you should see your custom user data.
We realize this is not ideal and we have a design to add new functionality to custom authentication and custom user data which will enable you to do this mapping at custom authentication time all in one step. We should get started on this work soon.
highly appreciate your response, glad that im getting some attention to this matter. im also concern that custom authentication does not return the same uid like email provider. seems like my only work around is to query users collection separately. but without knowing id means ive to query by email or my customer username.
What’s the use case for migrating users between apps? Generally, this is where we would recommend integrating with a fully-fledged IDP and 3rd party JWT provider like Auth0 or similar as they are more fully featured and would support moving authentication status around different App Services apps.