Benefits of using CosyncJWT
The MongoDB Realm Sync provides a number of authentication methods for a developer application. These methods include
- Anonymous Authentication
- Email/Password Authentication
- API Key Authentication
- Apple ID Authentication
- Google Authentication
- Facebook Authentication
- Custom JWT Authentication
CosyncJWT provides an authentication service that ties into the Custom JWT Authentication provider for MongoDB Realm. It is a service that provides identity management, secure login, and two-factor authentication either through the Google Authenticator app or through SMS using a Twilio account.
JWT authentication is explained more thoroughly here.
For the best possible experience, Realm suggest using a JWT authentication provider, based on JSON Web Tokens. In this scenario a provider signs a JWT token with an RSA encrypted private key after it has verified the identity credentials of an application user. The verification typically involves an email/password pair, along with a 2-factor verification using a Google authenticator or a user’s verified phone number with a code. The developer sets the corresponding RSA public key in the MongoDB Realm data base to insure the integrity of the JWT provider.
For more information concerning authentication with MongoDB Realm, see the following link: MongoDB Realm Authentication
The authentication flow between an Application and CosyncJWT for verifying the identity of a user is presented below.
Although a developer could implement a cloud based JWT authentication system, the time savings and low cost of using the CosyncJWT authentication system is certainly compelling. Rather than force a developer to implement their own JWT authentication scheme, the CosyncJWT solution provides a robust and secure implementation that can be used off the shelf.