customData

Returns the custom user data associated with the user in the Realm App as T.

The data is only refreshed when the user's access token is refreshed or when explicitly calling User.refreshCustomData.

Note This method supports full document serialization. Custom data will be deserialized with the built-in serializer for T and decoded with AppConfiguration.ejson.

Return

The custom user data associated with the user.

Parameters

T

the type to decoded the user custom data.


fun <T> User.customData(serializer: KSerializer<T>): T?

Returns the custom user data associated with the user in the Realm App as T.

The data is only refreshed when the user's access token is refreshed or when explicitly calling User.refreshCustomData.

Note This method supports full document serialization. Custom data will be deserialized with serializer and decoded with AppConfiguration.ejson.

Return

The custom user data associated with the user.

Parameters

T

the type to decoded the user custom data.

serializer

deserialization strategy for T.