Skip to content

Commit

Permalink
Several fixes for the FirebaseAccountService (#43)
Browse files Browse the repository at this point in the history
# Several fixes for the FirebaseAccountService

## ♻️ Current situation & Problem
This PR introduces several improvements for the FirebaseAccountService
and fixes some bugs and issues.
We fixed an issue where the initial account would not be associated
correctly and the following stateDidChange call would always be ignored
independent if the state actually changed between the initial check and
the call.
Further, we made minor changes to make sure that no user account is
associated when we try to login or signup for a new user account. We
previously always relied on the stateDidChange change handler to be
called to complete operations like signup/signin/logout/delete. These
operations now no longer rely on the stateDidChange listener to be
called and instead always propagate their changes themselves.

## ⚙️ Release Notes 
* Fixed an issue where the initial account wouldn't be associated
properly and all future state changes would be ignored until logout.
* Handle existing user accounts on signIn and signUp request to be
generally more robust against erroneous states.
* Do not always rely on the stateDidChange handler to be called.
* Added additional logging output.


## 📚 Documentation
--


## ✅ Testing
--

## 📝 Code of Conduct & Contributing Guidelines 

By submitting creating this pull request, you agree to follow our [Code
of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md):
- [x] I agree to follow the [Code of
Conduct](https://github.com/StanfordSpezi/.github/blob/main/CODE_OF_CONDUCT.md)
and [Contributing
Guidelines](https://github.com/StanfordSpezi/.github/blob/main/CONTRIBUTING.md).
  • Loading branch information
Supereg authored Sep 1, 2024
1 parent 12e7b77 commit d0cb58f
Show file tree
Hide file tree
Showing 6 changed files with 299 additions and 150 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let package = Package(
.package(url: "https://github.com/StanfordSpezi/SpeziFoundation", from: "2.0.0-beta.1"),
.package(url: "https://github.com/StanfordSpezi/Spezi", from: "1.7.1"),
.package(url: "https://github.com/StanfordSpezi/SpeziViews", from: "1.6.0"),
.package(url: "https://github.com/StanfordSpezi/SpeziAccount", exact: "2.0.0-beta.5"),
.package(url: "https://github.com/StanfordSpezi/SpeziAccount", exact: "2.0.0-beta.7"),
.package(url: "https://github.com/firebase/firebase-ios-sdk", from: "11.0.0"),
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.2.0")
] + swiftLintPackage(),
Expand Down
Loading

0 comments on commit d0cb58f

Please sign in to comment.