cachapa / firedart

A dart-native implementation of the Firebase Auth and Firestore SDKs
https://pub.dev/packages/firedart
Apache License 2.0
174 stars 62 forks source link

Moving to google's official auth #66

Open guyluz11 opened 3 years ago

guyluz11 commented 3 years ago

Some issues in this package could be due to our implementation of the auth token. We currently not using the Google's official auth package, we are using REST-based auth that we implemented.

I found googleapis_auth google official auth package that we can use as dependency or get implementation ideas for from it.

I also found firebase_auth_rest which claims to

Uses the official REST-API endpoints Supports automatic background refresh

firebase_auth_rest comes with implementation and googleapis_auth is as far as I understand only getting the OAuth2 credentials and we will need to implement talking to Firebase ourselves

Provides support for obtaining OAuth2 credentials to access Google APIs.

cachapa commented 3 years ago

Agreed. I think this was discussed in the past but I can't find it anymore.

In any case I agree. The current implementation was my original one, when the strategy was to use the REST API for everything. Eventually I discovered the protobuff implementation which was necessary for the real-time updates, and that seems to have a strong dependency on the official Google Auth API package.

Unfortunately I don't currently have the time to do that myself, which is why Firedart is still using this hybrid solution. If you want to take over that work I'd be happy to merge it.

guyluz11 commented 3 years ago

Decided to go with firebase_auth_rest, this way we will be able to login with more account types like Facebook, apple and more.

I think it is using googleapis_auth somehow too.