Guides
Users
Register a new user

Register a New User

So you've created the perfect custom app and now want to elevate the end user experience by ensuring that they can use these apps securely. This is where the whole auth concept comes into play. In each project you can register users either through the app SDKs or through the dashboard. This means, you can provide these credentials to end users or end users can directly register themselves through your app to access features of Grandeur. This way you can build an auth layer in your apps.

Creating a New User Account

To control the device from the app, you'll need a user account on the dashboard.


Here's how you can register users through the SDK:

auth.register()

The first step to accessing any platform is signing up on it. To create a new user account, simply provide the user email, password, display name and phone number as an argument to this function. Registering a new user account with SDK involves verification from our side to protect you from bogus users. So when you execute this function, Grandeur automatically sends a verification code to the phone number provided in the argument and returns you a promise so you can access the confirmation method.

Account registration has been illustrated in the example below

// Get user data from the inputs and
// Submit request to the server
auth.register(email, password, displayName, phone).then((res) => {
  // Handle Response
})

Deleting a User Account

Once you are done with operating a particular user account, you can delete it from your platform to add a new user or give the device access to a new one.