alborghetti / ABAPFire

ABAP Firebase Client
http://alborghetti.github.io/ABAPFire/
MIT License
10 stars 4 forks source link

Authentication issue #3

Open js1972 opened 6 years ago

js1972 commented 6 years ago

Hi. I notice you are only supporting email/pw as an authentication mechanism... Does this mean we cannot use a firebase service account (which only seems to work with token-based auth)?

I'm not sure how to find the necessary information:

ls_config-apikey = '[your apikey]'. ls_config-authdomain = '[your authdomain]'.

Maybe firebase has moved on since these methods were possible?

alborghetti commented 6 years ago

Hi. You can get apikey and authdomain from your project in Firebase (just click on "Add Firebase to your web app". Service account is not supported, as the main idea was to create a REST client helper in ABAP.

If you need admin SDK, probably the best way is to install a java or node server and connect them to your ABAP server. At this link you can find more info on REST authentication: https://firebase.google.com/docs/reference/rest/auth/?authuser=0

js1972 commented 6 years ago

Yes I thought as much - as in you're using user-level security. We need to use a service account instead. I've got it working easily enough with Python. The ABAP OAuth client is hideous however so I think I will just call out to a python script to get a JWT then use that to authenticate the API calls in ABAPfire. ;-)