<br/>
<BlockSwitcher>
<Block name="Current Device">

```dart
Future<void> forgetCurrentDevice() async {
  try {
    await Amplify.Auth.forgetDevice();
    print('Forget device succeeded');
  } on Exception catch (e) {
    print('Forget device failed with error: $e');
  }
}
```

</Block>
<Block name="Specific Device">

```dart
Future<void> forgetSpecificDevice() async {
  try {
    const device = CognitoDevice(id: 'us-west-2_38284cea-6c7f-4a8c-bcfa-ac8946a0d1eb');
    await Amplify.Auth.forgetDevice(device);
    print('Forget device succeeded');
  } on Exception catch (e) {
    print('Forget device failed with error: $e');
  }
}
```

</Block>
</BlockSwitcher>
