且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从Firebase注销后从Google注销

更新时间:2023-12-04 16:30:52

通常,这是预期的行为.从Firebase注销与从Google注销无关.用户需要从Google显式退出.但是,如果您知道您的应用程序将在共享设备上使用,则可以执行以下操作:

Normally this is expected behavior. Sign out from firebase is unrelated to sign out from google. User would need to explicitly sign out from google. However, if you know your application will be used on a share device you can do the following:

// Sign out from firebase.
firebase.auth().signOut().then(function() {
  // Redirect to google sign out.
  window.location.assign('https://accounts.google.com/logout');
}).catch(function(error) {
  // Error occurred.
});