File tree Expand file tree Collapse file tree 1 file changed +19
-18
lines changed
src/pages/[platform]/build-a-backend/auth/manage-users/manage-devices Expand file tree Collapse file tree 1 file changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -327,24 +327,6 @@ Future<void> fetchAllDevices() async {
327327
328328</InlineFilter >
329329
330- <InlineFilter filters = { [" flutter" ]} >
331-
332- ## Fetch the current device
333-
334- You can fetch the current device by using the following:
335-
336- ``` dart
337- Future<void> fetchCurrentUserDevice() async {
338- try {
339- final device = await Amplify.Auth.fetchCurrentDevice();
340- safePrint('Device: $device');
341- } on AuthException catch (e) {
342- safePrint('Get current device failed with error: $e');
343- }
344- }
345- ```
346-
347- </InlineFilter >
348330
349331<InlineFilter filters = { [" android" ]} >
350332
@@ -446,6 +428,25 @@ func fetchDevices() -> AnyCancellable {
446428
447429</InlineFilter >
448430
431+ <InlineFilter filters = { [" flutter" ]} >
432+
433+ ## Fetch the current device
434+
435+ You can fetch the current device by using the following:
436+
437+ ``` dart
438+ Future<void> fetchCurrentUserDevice() async {
439+ try {
440+ final device = await Amplify.Auth.fetchCurrentDevice();
441+ safePrint('Device: $device');
442+ } on AuthException catch (e) {
443+ safePrint('Get current device failed with error: $e');
444+ }
445+ }
446+ ```
447+
448+ </InlineFilter >
449+
449450You can now set up devices to be remembered, forgotten, and fetched.
450451
451452{ /* user agents */ }
You can’t perform that action at this time.
0 commit comments