Pass firebase auth info to in-app-browser


#1

I have an ionic app using firebase auth. In one page, I have in-app-browser to open a website which allows the user to save some items to their collection. How can I pass along the auth info to this external website, so the user doesn’t need to log in again? (i.e. how the external website knows it’s the same user whom have already been login within the ionic app)


#2

Do you control this external web site? What’s the situation?


#3

Yes I have control of this ‘external’ site. It’s originally part of the app, but it deals with fabric.js library, and there are some hiccups when it was used with angular, so I tried to have a plain javascript page (no angular), and redirects the user to that page. Since the user needs to login to save/retrieve data from the firebase database, so I need to pass the auth. What I did was force the user to login once they were redirected to this plain javascript page, which seems redundant as the user was already logged in the ionic app, so I was thinking if I can simply pass the auth token and make the flow a bit smooth.


#4

Can’t you just test whether firebase.auth.user is not null? If you control the communications protocol, I don’t understand the issue yet.