How to maintain login in swiftui -- case if I kill the app and reopen it again then how to maintain the login with the user identification

Please note that these forums are meant for discussing the Swift Programming Language.

It looks like you are using Firebase, so perhaps a forum dedicated to Firebase would be a better place for such questions.

That said: the Auth instance has a currentUser property. Checking if this value is non-nil would mean that the user is already signed in. Firebase persists this value from launch to launch, so you don’t need to do this yourself. :blush:

1 Like