Access Firebase Storage from a Java application

1,098 views
Skip to first unread message

Anders Forsell

unread,
Jun 7, 2016, 3:21:32 PM6/7/16
to Firebase Google Group
I really enjoy working with Firebase and the simplicity in configuring the Storage autorization rules.

I'm storing photos in Firebase Storage, and now I need to add a feature that allows the user to generate a Word report from a Java desktop application or from a Java server application using Vaadin.

What options do I have to access the photos?

Thanks,

Anders

Mike Mcdonald

unread,
Jun 7, 2016, 8:08:57 PM6/7/16
to Firebase Google Group
Firebase Storage is compatible with Google Cloud Storage and shares the same storage bucket, so you can use a Google Cloud Storage client API (like this one) to retrieve photos from your bucket.

Thanks,
--Mike

Anders Forsell

unread,
Jun 8, 2016, 2:32:47 PM6/8/16
to Firebase Google Group
Thanks Mike, but I can't find how to use Firebase email/pwd authentication...

It seems I must use OAuth with a Google account since my application will be running "on user behalf" as described here https://developers.google.com/identity/protocols/OAuth2#basicsteps

I was hoping for a simple Firebase API similar to what I can use from the web app, are there plans to make that available for Java apps?

Anders

Mike Mcdonald

unread,
Jun 8, 2016, 9:51:43 PM6/8/16
to Firebase Google Group
Anders, 

You're correct that the authentication model is different. Philosophically, this is due to the fact that Firebase clients are designed for mobile clients and third party authentication (end user w/social providers, for instance), while Google Cloud Platform clients are designed for second party authentication by a trusted server. Desktop (in particular things like Desktop Java/C++ and OSX) spans a weird place where it's not mobile and may not use the same social authentication, but it is still third party authentication ("on behalf of the user," as you said).

I can't say that we have any plans for desktop Java for client side apps at the moment, though we do support Node (so you could build an Electron app) and are investigating scenarios where that client could be used for 2nd or 3rd party authentication, depending on how the developer configured the client.

Thanks and sorry I don't have a better answer for this,
--Mike

Anders Forsell

unread,
Jun 8, 2016, 11:50:55 PM6/8/16
to Firebase Google Group
Ok, I understand.

I realized that Chrome supports the File API so my workaround could be to let the browser download the images and then store them on disk so that the user can load them from the desktop application.

The web is a fantastic platform and especially Chrome ;-)

Thanks again,

Anders
Reply all
Reply to author
Forward
0 new messages