How can I know the idToken of the current user with the current setup of firebase in Appgyver?
The idToken is useful to use some Firebase functions by REST API.
There is a way to get an idToken knowing the refreshToken by REST API. It has a bug, I need refreshToken id but both the “Email & password authentication (Firebase Auth)” and the “Get current user (Firebase Auth)” return the refreshToken = EMPTY.
Meanwhile the flow function “Get current user (Firebase Auth)” shows the refreshToken (at least my app does not show the error anymore).
STILL:
equally important is to know the idToken , because only with the idToken can the app read or write data with the flow function “HTTP-request”, as soon as security rules are in place.
The idToken is completely missing in the out put arguments of “Get current user (Firebase Auth)”:
You are right, I also only get the refresh token in the web preview and not in iOS preview. Same like what you are seeing.
I am afraid, I now have to delete the “ Email & password authentication (Firebase Auth) ” as security rules together with HTTP requests are impossible to use without the idToken. Very sad
Until I have a better solution I have combined the two solutions. appgyver’s new firebase email and password connection works fine to create a permanent connection that refreshes itself. the signin by http request generates a session that lasts 3600 seconds and then you have to refresh the idToken. in my case I have used the firebase authentication login page adding and reconnecting via http request when they log in. this seems unproductive but in my case it works, when the application refreshes they reconnect through the two sites obtaining an idToken via http request to use it in Path or in other practical matters. In my case I only need the idToken to create records via PATH in firebase and authorize some operations that need head authentication because Create Records via appgyver does not allow customizing the id of the document, as soon as they solve those problems or add those functions to appgyver the connection via http request will not be needed. a greeting.