rememberDevice method

Future<void> rememberDevice()

Remembers the current device.

For more information about device tracking, see the Amplify docs.

Examples

import 'package:amplify_auth_cognito/amplify_auth_cognito.dart';
import 'package:amplify_flutter/amplify_flutter.dart';
Future<void> rememberCurrentDevice() async {
  try {
    await Amplify.Auth.rememberDevice();
    safePrint('Remember device succeeded');
  } on AuthException catch (e) {
    safePrint('Remember device failed with error: $e');
  }
}

Implementation

Future<void> rememberDevice() => identifyCall(
      AuthCategoryMethod.rememberDevice,
      () => defaultPlugin.rememberDevice(),
    );