-
-
Notifications
You must be signed in to change notification settings - Fork 212
fix(auth): emit local stored session as the initial session #822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 18477966756Details
💛 - Coveralls |
|
Hello @grdsdev. I just realised, there is no way to enable the trait in Xcode, as iOS projects are not pure SPM projects. There is no Also, upon reading Apple's docs regarding traits:
In this case, the trait removes/alters API behavior, which might not align with that rule. Do you think we could come up with a different solution? Runtime flags instead? Compilation flag? A new authStateChanges property? Apologies for not raising this before it got to production. I didn't give much thoughts to Traits as I just now familiarised with them. |
|
Thanks @vojtabohm for bringing that up. You're right, we're not using traits as it is supposed to be used. I decided to add a runtime flag when initializing the client, you can follow it on #844 |
|
I just realized this issue in my project, thanks for the heads up. |
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
currentSessionvariable which returns the stored session, without validating if it is expired or not, and lets users in.Although the behavior above isn't wrong nor a bug, since it is documented that the
currentSessionmay have been expired, it is a behavior that just brings more confusion to the usage.What is the new behavior?
Added a new trait
EmitLocalSessionAsInitialSessionfor customers to opt-in to the new behavior since this is a breaking change.Additional context
#630
#753