Cosync Overview

Cosync Overview #

Cosync provides the building blocks decribed below as well as the Cosync Portal which is the interface that allows you to connect the Cosync services to your Realm apps and manage all of your building blocks in one place.

CoSync Auth #

MongoDB Realm does provide a few authentication methods out of the box, but with all of them you are locked into their system and implementing any sort of custom auth flow or emails isn’t possible. The database for your users is somewhat of a blackbox where you cannot access all of the data that you may want to access. Anonymous authenticated users expire after a set amount of time and any user data, including mapping partitions to user ids, will fail over time.

CoSync Auth solves many of these Realm auth headaches:

  • Robust Auth Options: Email, phone, authenticator, signup, invitation, password strength, custom user data and email templates allow you to create a rock solid authentication flow that works for your application,
  • Social Login Login and signup using social login protocols: Apple Login and Google login,
  • Unique Anonymous Auth can be provided by creating a one time JWT token to create a permanent Realm user rather than relying on Realm Anonymous auth that will expire users after 30-90 days,
  • Self Hosted Option allows you to grow with your application and manage your own user database, exporting and running functions as needed to develop customer relationship pipelines and manage your own user authentication database.

summary2


Rather than storing images and videos in your Realm database, best practice is to store a reference URL and then cache those assets after accessing them. Technically you could store small images as binary data, but the syncing and size can become unweildy quickly. A powerful solution will account for local assets, resizing assets as needed, uploading, storing, and asset retrieval.

Cosync AssetLink is a building block that adds Realm objects and functions to manage all of this for you. The library will automatically listen for new assets, resize, upload and replace any local references with the S3 link for asset distribution across synced devices.