From a template
Last updated
Was this helpful?
Last updated
Was this helpful?
This endpoint will create a user in our hosted Firestore database. It will get the user's document from the "users" collection, check their password and if the password is correct return an authentication token for the user.
To set it up:
Drag and drop a mongodb node and click on it to open the settings.
Head to https://www.ondiagram.com/app, click "From Template" and select "Register".
Right after, click on JWT node to open the settings. If that's the first time you are viewing the settings of a JWT node for this Diagram project, you will be asked for a secret key to encrypt tokens with.
To test out the endpoint open the debug panel. Click on the "Body" tab and add two properties to the body of the request, the first should be "email" and the second "password" with values for a new user.
Click "Run" and Diagram will create a new user for you and return their token.
This endpoint can also be called from a frontend or in another nocode app in a similarly but remember to set the request to POST.