Sign In with Device
Our Android SDK offers the easiest way to integrate "Sign in with device" to your android app. You can simply call a function and it does most of the heavy lifting and authentication for you.
Last updated
Our Android SDK offers the easiest way to integrate "Sign in with device" to your android app. You can simply call a function and it does most of the heavy lifting and authentication for you.
Last updated
Authenticating users using Trusted Devices with Cotter's Android SDK consists of the following steps:
Import and Initialize Cotter
Calling functions to register devices a Trusted Device
Calling functions to authenticate from Trusted and Non-Trusted Device
Set Allowed Methods in the Dashboard to allow Trusted Devices
Create a User: Create a user in Cotter by specifying your user ID.
Add JitPack repository your project level build.gradle
at the end of repositories.
Add the Cotter's SDK as a dependency in your app level build.gradle
.
Check the latest version here https://github.com/cotterapp/android-sdk/releases. Then sync your gradle files.
You need to set allowed methods for authenticating your users. To allow TRUSTED DEVICES
, go to https://dev.cotter.app/rules
Remember to set the correct Project in the dropdown list
To use Cotter's sign in with device functionality, you need to first register the user to Cotter.
Your server should do this request to Cotter's server during Registration.
Check out Create a User API Reference for full Description
You can now use the SDK to enroll and verify Trusted Devices for the user you just created.
In your MainActivity, initialize Cotter with API keys, Cotter's URL to use (prod/test), and your User ID.
Production Endpoint: https://www.cotter.app/api/v0
Example:
Right after your user finished their registration to your app, you should automatically register the device as a Trusted Device (or prompt your user if they want to make this device as a Trusted Device).
To enroll the current device as a TrustedDevice: