File tree Expand file tree Collapse file tree
FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/FirebaseAuthSwiftUI/Views Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,10 +90,10 @@ extension EmailPasswordView: View {
9090 . padding ( . bottom, 8 )
9191
9292 if authEnvironment. authenticationFlow == . login {
93- Button ( " Forgot password? " ) {
94- // TODO: - does this update to a new screen or update in-situ???
95- }
96- . frame ( maxWidth : . infinity , alignment : . trailing )
93+ NavigationLink ( destination : PasswordRecoveryView ( )
94+ . environment ( authEnvironment ) ) {
95+ Text ( " Forgotten Password? " )
96+ }
9797 }
9898
9999 if authEnvironment. authenticationFlow == . signUp {
Original file line number Diff line number Diff line change 1+ import SwiftUI
2+
3+ public struct PasswordRecoveryView : View {
4+ @State private var email = " "
5+ public var body : some View {
6+ VStack {
7+ Text ( " Password Recovery " )
8+ LabeledContent {
9+ TextField ( " Email " , text: $email)
10+ . textInputAutocapitalization ( . never)
11+ . disableAutocorrection ( true )
12+ . submitLabel ( . next)
13+ } label: {
14+ Image ( systemName: " at " )
15+ } . padding ( . vertical, 6 )
16+ . background ( Divider ( ) , alignment: . bottom)
17+ . padding ( . bottom, 4 )
18+ }
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments