enrollDevicefor a user ID that already exist in Cotter will result in the error "user already exist".
enrollDeviceonly works on the user's first ever trusted device. For additional trusted devices, you have to use the Add New Trusted Device method using the QR code.
cotter.trustedDevice.getNewEventwith a non-trusted device?
getNewEventfetches a new un-approved authentication request that are generated when the user tries to login from a non-trusted device. However, since you're calling
getNewEventfrom a non-trusted device, this device cannot approve the request.
cotter.trustedDevice.reqAuthwhen you have not registered the user with Cotter yet?
enrollDevice(because that function will also register a new user to Cotter for you).
cotter.trustedDevice.removeDevicefrom a non-trusted device?