pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
12.35k stars 1.44k forks source link

2FA View not appearing in Tic-Tac-Toe demo #2207

Closed JOyo246 closed 1 year ago

JOyo246 commented 1 year ago

Description

When using an email with "2fa" the reducer does correctly set state..

-     _twoFactor: nil
+     _twoFactor: TwoFactor.State(
+       _alert: nil,
+       code: "",
+       isFormValid: false,
+       isTwoFactorRequestInFlight: false,
+       token: "deadbeef"
+     )

However the 2fa does not get presented.

Checklist

Expected behavior

I expect the 2fa flow to present.

Actual behavior

The 2fa flow is not presented

Steps to reproduce

  1. Run Tic-Tac-Toe sample
  2. select SwiftUI
  3. enter an email that contains the chars, 2fa.
  4. enter password: "password
  5. select log in

The Composable Architecture version information

0.54.1

Destination operating system

iOS 16.4

Xcode version information

Xcode 14.3

Swift Compiler version information

No response

sehdich commented 1 year ago

I also can reproduce the issue. What I've found out so far, it's may related to the .navigationDestination(...) as it works as expected when presenting it via a .sheet(...). (LoginView.swift L.66)

stephencelis commented 1 year ago

Looks like that demo was still using NavigationView, which is incompatible with navigationDestination. It definitely worked at some point during the nav beta, so must've been lost somehow. Should be fixed again when we merge https://github.com/pointfreeco/swift-composable-architecture/pull/2264