搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

clear 2FA cache on logout

  • 2 回覆
  • 1 有這個問題
  • 45 次檢視
  • 最近回覆由 mnlpn

more options

Using 2FA Auth as website login. How would you clear cache when user logs out. the logout:logout@mywebsite is not a good solution,

   as myname@mywebsite will let me back in again.

Thanks

Using 2FA Auth as website login. How would you clear cache when user logs out. the logout:logout@mywebsite is not a good solution, as myname@mywebsite will let me back in again. Thanks

被選擇的解決方法

Hi mnlpn, are you looking at this as the website user or the website developer?

User Perspective

Generally speaking, after your second factor is authenticated, the site will set a cookie with some kind of token in it. When Firefox requests pages from the site, it sends the site the cookies it has set and the site considers whether you should have access. If you want to force a new MFA/2FA, you can clear the site's cookies when you are done using it. Here's how:

While viewing a page on the site, click the lock icon at the left end of the address bar. After a moment, a "Clear Cookies and Site Data" button should appear at the bottom. Go ahead and click that.

In the dialog that opens, you will see one or more matches to the current address so you can remove the site's cookies individually without affecting other sites.

Developer Perspective

I haven't done this myself, but I imagine you could modify your code that validates the MFA/2FA cookie so that token can only be used if it was issued during the same session. Maybe? Generally speaking, we suggest other sites for developer support: Where to go for developer support.

從原來的回覆中察看解決方案 👍 0

所有回覆 (2)

more options

選擇的解決方法

Hi mnlpn, are you looking at this as the website user or the website developer?

User Perspective

Generally speaking, after your second factor is authenticated, the site will set a cookie with some kind of token in it. When Firefox requests pages from the site, it sends the site the cookies it has set and the site considers whether you should have access. If you want to force a new MFA/2FA, you can clear the site's cookies when you are done using it. Here's how:

While viewing a page on the site, click the lock icon at the left end of the address bar. After a moment, a "Clear Cookies and Site Data" button should appear at the bottom. Go ahead and click that.

In the dialog that opens, you will see one or more matches to the current address so you can remove the site's cookies individually without affecting other sites.

Developer Perspective

I haven't done this myself, but I imagine you could modify your code that validates the MFA/2FA cookie so that token can only be used if it was issued during the same session. Maybe? Generally speaking, we suggest other sites for developer support: Where to go for developer support.

more options

will take it to developer support. Thx.