sdk-for-flutter icon indicating copy to clipboard operation
sdk-for-flutter copied to clipboard

🚀 Feature: a function like onAuthStateChange in firebase

Open mimib00 opened this issue 3 years ago • 3 comments

🔖 Feature description

this function is a stream and returns the user object if logged in or null if logged out

right now I'm trying to make this feature but idk if the appwrite team would like this feature or not.

so far implementing this feature is like hell for me cause it's my first time trying to contribute to an open-source project.

🎤 Pitch

in firebase, there is this function call onAuthStateChange and it's a stream that returns a user object or null, and it reacts automatically with user login and logout, it helps the dev to maintain the auth state pretty quickly as you just need to listen to the stream once and put the views you want to show when logged in and logged out.

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

mimib00 avatar Jun 16 '22 22:06 mimib00

@mimib00 Hi, thank you for feature request and your interest in contributing. However, rather than this being a part of our SDK this will be better suited as another package that uses Appwrite's SDK to implement this feature. Something like appwrite_auth_kit which uses ChangeNotifier and Inherited Widget to achieve something similar. Do check it out and let us know. Also if you are looking to contribute in our SDKs you should check out our https://github.com/appwrite/sdk-generator repository that's where we develop and generate our SDKs.

lohanidamodar avatar Jun 19 '22 00:06 lohanidamodar

Thanks for the reply I'll check that package, and I'll see what I can contribute to the project

mimib00 avatar Jun 19 '22 08:06 mimib00

Thanks for the reply I'll check that package, and I'll see what I can contribute to the project

Hi, can you share with me how it was the experienxe dealing with theis package, is it reliable for imolementing same streamung mexhanisms.

And is there any implementation that should be done that it don't include ?

Thank you

anasfik avatar Feb 19 '23 05:02 anasfik