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 @@ -4,6 +4,7 @@ public struct PasswordRecoveryView {
44 @Environment ( AuthEnvironment . self) private var authEnvironment
55 @State private var email = " "
66 @State private var errorMessage = " "
7+ @State private var showModal = false
78
89 private var provider : EmailPasswordAuthProvider
910
@@ -14,6 +15,7 @@ public struct PasswordRecoveryView {
1415 private func sendPasswordRecoveryEmail( ) async {
1516 do {
1617 try await provider. sendPasswordRecoveryEmail ( withEmail: email)
18+ showModal = true
1719 } catch {
1820 errorMessage = error. localizedDescription
1921 }
@@ -54,6 +56,18 @@ extension PasswordRecoveryView: View {
5456 . padding ( [ . top, . bottom] , 8 )
5557 . frame ( maxWidth: . infinity)
5658 . buttonStyle ( . borderedProminent)
59+ } . sheet ( isPresented: $showModal) {
60+ VStack {
61+ Text ( " Instructions " )
62+ . font ( . headline)
63+ Text ( " Please check your email for password recovery instructions. " )
64+ . padding ( )
65+ Button ( " Dismiss " ) {
66+ showModal = false
67+ }
68+ . padding ( )
69+ }
70+ . padding ( )
5771 }
5872 }
5973}
You can’t perform that action at this time.
0 commit comments