Closed JohnsonEricAtSalesforce closed 7 months ago
If we are going to keep the
NavigationStack
model we at least need to fix the existing back behavior.
After we chatted, I actually did demo a version that uses a "Cancel" button throughout the navigation instead of the custom "back arrow". I thought it actually looked really nice so I made a video to share.
This turned into a fun update. I like the navigation stack since it demonstrates to our app developers how the view controller passed to native login manager actually has a great deal of control over all the headless identity flows. It can display other views and heavily tailor the user experience. Plus, with the "Cancel" button as a persistent element the app developer knows their user can cancel authentication at any time (it's not actually a "Back" button since this view controller is presented modally).
Thoughts? I agree we don't want the template to be overly complicated yet since it will eventually have login, password-less login, forgot password and registration it should be a scalable starting point.
If we are going to keep the
NavigationStack
model we at least need to fix the existing back behavior.After we chatted, I actually did demo a version that uses a "Cancel" button throughout the navigation instead of the custom "back arrow". I thought it actually looked really nice so I made a video to share.
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-19.at.19.35.26.mp4 This turned into a fun update. I like the navigation stack since it demonstrates to our app developers how the view controller passed to native login manager actually has a great deal of control over all the headless identity flows. It can display other views and heavily tailor the user experience. Plus, with the "Cancel" button as a persistent element the app developer knows their user can cancel authentication at any time (it's not actually a "Back" button since this view controller is presented modally).
Thoughts? I agree we don't want the template to be overly complicated yet since it will eventually have login, password-less login, forgot password and registration it should be a scalable starting point.
This looks great.
@brandonpage - I did another version and really did like a single view conditional layout better in the end. This version only has NativeLoginView
and it switches on an enum to determine the correct layout for the chosen identity flow.
🎸 Ready For Review 🤘🏻
This updates the sample app with the ability to navigate to other login, registration and forgot password flows. The password-less login view one-time-passcode is the only new flow that will be implemented in this update.
There's lots of new SwiftUI concepts at play for the first time here.
@brandonpage - There's one problem with navigation bars in UIKit Vs. SwiftUI we have to look at before we merge this one. Look for your call to action in the code walkthrough and see if you have any ideas.