Manage Application Settings #
The Application view within the Cosync Portal presents seven tabs from which a developer can manage an application. These seven tabs include
The Settings tab presents the high level settings for the application.
This tab includes:
- App Id
- App Name
- JWT Enable
- App Status
The App Id is a 32-byte unique identifier assigned to the application by Cosync Portal at the time it is created - it cannot be changed.
The App Name is a human readable name that describes the application - it is usually recommended to give it the same name as the associated MongoDB Realm Application.
The JWT Enable is a toggle that controls whether JWT authentication is enabled (or not). The developer might choose to disable JWT authentication if he/she was only interested in the Cosync Storage functionality of Cosync.
The Reset function will clear all the authenticated users from the Cosync application and reset it to its original state. Only do this function if you want to reset the database. It cannot be undone!
The Export function will export all of the users in the authentication database to a collection of CSV files. This is used to migrate users to another Cosync app, or to another authentication system altogether. The Export function will create a compressed zip file in your downloads file that contains a directory of CSV files sufficient to import the app into another app. It is typically used to migrate an app from the SANDBOX to a self-host Cosync JWT server.
The App Status is either active, inactive, or migrated. Only applications with an active status can authenticate users on behalf of a MongoDB Realm application. The developer can choose to set an active application to inactive to temporarily suspend an application. The migrated status is set by Cosync if the applications authentication system has been migrated to another authentication provider or to another Cosync application.
The Delete App functionality is used to delete the application from the SANDBOX or the self-hosted Cosync JWT server. This operation cannot be undone!
MongoDB Realm #
The MongoDB Realm tab within the application detail is used by the developer to configure a MongoDB Realm Application for either the Cosync Storage module or the CosyncJWT service.
It is the MongoDB Realm Application Id that is held by the Cosync Portal (and entered by the developer) that makes the connection between an application at the Cosync level and the Realm level. We explain in detail in the section below how to retrieve the MongoDB Realm Application Id (see link)
JWT Settings #
The settings for JWT can be managed for a Cosync App in this tab after it is initialized in the MongoDB Realm tab. It includes the ability to manage the following features:
- Two Factor Verifications (2FA) like Google Authenticator and Phone verifications through Twilio.
- App Invitation which can then be accessed through the Cosync REST API.
- App Signup which can then be accessed through the Cosync REST API.
- Signup verification either through a 6 digit code or a link.
Metadata fields are mapped to Custom User Data in MongoDB Realm.
Invite Metadata fields allow you to set additional fields for invitations to store within your user database.
Password Filter allows you to set requirements that will be checked when setting a password for a new user or a password reset.
The Email Extension allows you to connect your SendGrid account to allow sending of automated emails from your custom domain.
JWT Users #
If the developer had JWT Enabled for the application, the MongoDB Realm tab would contain additional controls to configure the CosyncJWT authentication service for the MongoDB Realm Application. The JWT Users tab is used to view the CosyncJWT users who are using the Cosync Application. This tab provides a list of all the users for the Application that have signed up through CosyncJWT.
Application Keys are used to connect to the Cosync REST API and are utilized in your client code. This section will come up in the Cosync SDKs when implementing initializing the CosyncJWT package.
Email Templates #
These templates can be utilized to customize the automated communication that is sent for your authentication processes. In order to customize the From: address, make sure to set up the Email Extension in the JWT Settings.
Lastly, the Logs tab provides access to a limited set of server logs while on the Cosync Hosted Server. For more robust logs, consider upgrading to Cosync JWT Self-Hosted.