datasource.authWithOAuthRedirect("google",
(error, authData) => {
if(error) {
reject({message: error.message, obj:error})
} else {
resolve(authData);
}
},
{ remember: "sessionOnly", scope: "email" }
) });
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e7592a4a-40e4-45ad-9378-03ce1d2cc21a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hmm...this feels like a bummer. I'm just trying to think through the implications. A few questions/comments:* If a person uses a Firebase-backed web app on a public machine (e.g. library), then closes their browser, and the next person finds a link to that app in the browser history, is that second person going to be authenticated in that app? Because that seems bad.
* Does this mean that Firebase sessions never time out? So if I log into my Firebase-backed web app, then leave on vacation for two weeks without shutting the browser down, and then return, I'm still authenticated?
* I'm not 100% sure how authenticating against a third-party like Google/Facebook/etc is supposed to work. Can one set a timeout for their Google authentication? If so, then does that means it's possible to log into a Firebase app via Google, then have your Google auth timeout, but yet still be authenticated with the Firebase app? If so, that seems bad.
* Performing JS operations on window close is historically pretty darned bad. Having said that, is there a reliable way of killing a Firebase auth session on window close?
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/0f61f7c0-6718-47dc-822d-82ab44ccea9d%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/uYMlQny1Jb4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/db5a077b-ee18-40a2-8d26-bad4c38f28ca%40googlegroups.com.
var fbApp = null;
function Firebase(url) {
var rootRef = fbApp.database().ref();
url = url.replace(/^https:\/\/.*.firebaseio\.com/, "");
if (url == "") {
url = "/";
}
return rootRef.child(url);
}
var firebaseAppName = $sessionStorageProvider.get('firebaseAppName') || "fbApp_"+moment().format();})
$sessionStorageProvider.set('firebaseAppName', firebaseAppName);
fbApp = firebase.initializeApp(firebaseConfig, firebaseAppName);
So the $sessionStorage will have the same firebaseAppName as long as the TAB is opened. A new tab, a new name, a new firebase app, a new auth.
The only caveat is Firebase will keep it`s list in localStorage. So it will grow over time. What I think I'll do is keep a list of firebaseAppName in the local storage and call signOut() on each app once in a while...
What do you think if this?
VB