-
Notifications
You must be signed in to change notification settings - Fork 614
JVM support #14
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
Comments
@nbransby this is unlikely to happen with the Android SDK, and attempting to do it yourself would be somewhere between "very hard" and "impossible" depending on which features you're talking about. I think a more realistic feature request would be to allow for client-safe authentication in the Firebase Admin Java SDK. That's what we recommend for use in "pure Java" environments but right now it authenticates with a service account which means it would not be appropriate for something like an Android Studio plugin which wouldn't always run on your trusted machine. Does that make sense? |
Yes makes sense, does it support all the realtime sockety goodness of the android sdk? Im primarily interested in using the firestore from a client perspective, don't need the UI bits of auth obviously, would be using a custom auth system |
Yes the Java SDK has support for real-time queries using Cloud Firestore. That SDK is open-source as well and you can check it out here: I would suggest opening an issue on that SDK requesting the ability to authenticate as a user for Cloud Firestore. @hiranya911 is the maintainer there, so I am cc-ing him here to let him know I sent you! |
Well that went well 😆 firebase/firebase-admin-java#206 (comment) So tell me more about the "very hard" option? If its just pulling out a firestore wrapper, doable? |
So I've started with a fork of this repo and replace all So far I have
These files do exist in My gradle changes are here if you are interested: |
The protocol buffer compiler (protoc) generates Java sources from .proto files. The resulting .java files are then compiled as usual. Protoc needs all the .proto files for dependencies to be available when compiling, even when those are otherwise being built into separate artifacts. I can't see anything in the changes you've made that would perturb that setup, but the error you're seeing suggests that protoc is no longer able to see the .proto files from the protolite-well-known-types library. The way this is supposed to work is that each jar result should include the protos used in itself as resources. Then anything that depends upon it should be able to extract those onto the filesystem such that protoc can then find them. In the android build, I see the common types ending up in |
Yes I noticed that, they are not there on my fork but are present on the
original - any ideas on how to get them back?
…On Fri, 28 Sep 2018 at 19:11, Gil ***@***.***> wrote:
The protocol buffer compiler (protoc) generates Java sources from .proto
files. The resulting .java files are then compiled as usual.
Protoc needs all the .proto files for dependencies to be available when
compiling, even when those are otherwise being built into separate
artifacts. I can't see anything in the changes you've made that would
perturb that setup, but the error you're seeing suggests that protoc is no
longer able to see the .proto files from the protolite-well-known-types
library.
The way this is supposed to work is that each jar result should include
the protos used in itself as resources. Then anything that depends upon it
should be able to extract those onto the filesystem such that protoc can
then find them. In the android build, I see the common types ending up in
firebase-firestore/build/extracted-include-protos. You should be able to
see those there too.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABUob8cIhQDqcP-botj_Q-MxjnJvBA7yks5uflhcgaJpZM4Wlv9k>
.
|
I've got auth/functions/firestore from this sdk mostly working on the JVM now - and in the end without forking the source. Instead I have written a firebase specific android polyfill that implements the android sdk classes that are used by the project |
@nbransby that's badass! Would love to see a writeup once you're done working on it. |
@samtstern intercepting fire auth calls via google play services and replacing them with REST API calls is proving the most difficult mainly because I have to work with the obfuscated decompiled class files 😢 is there any plans to open source auth? |
@nbransby we'd like to open source all of our SDKs! Auth is trickier than most because it depends on the Google Play services app on your phone so even if we open sourced the client SDK it would still be missing the heart of the implementation for many parts. |
Understood but would still be useful for doing something such as this - I have got it working by removing the auth module and implementing it by hand using the REST API (only using custom token sign in currently) |
What feature would you like to see?
Pure java version to run in non android environments, I believe the original sdk supported this, what was the motivation to drop it?
Before I attempt such as task how difficult would it be to fork this project and remove the android specific code?
How would you use it?
Desktop java (In my case an Android Studio / IntelliJ plugin)
The text was updated successfully, but these errors were encountered: