diff --git a/debian/patches/oauth-fix.patch b/debian/patches/oauth-fix.patch
new file mode 100644
index 0000000000000000000000000000000000000000..f0ef01f46736b4ad0105b0ed1b943398d0f3f31a
--- /dev/null
+++ b/debian/patches/oauth-fix.patch
@@ -0,0 +1,18 @@
+From: pierre-lehnen-rc <pierre-lehnen-rc@example.org>
+Date: Wed, 25 Oct 2023 22:30:00 +0200
+Subject: fix: oauth login by redirect failing on firefox
+
+Origin: https://github.com/RocketChat/Rocket.Chat/pull/30750
+---
+diff --git a/apps/meteor/app/custom-oauth/client/custom_oauth_client.js b/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
+index a11277758438..c516f115aede 100644
+--- a/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
++++ b/apps/meteor/app/custom-oauth/client/custom_oauth_client.js
+@@ -6,7 +6,6 @@ import { Meteor } from 'meteor/meteor';
+ import { OAuth } from 'meteor/oauth';
+ import { ServiceConfiguration } from 'meteor/service-configuration';
+ 
+-import './swapSessionStorage';
+ import { isURL } from '../../../lib/utils/isURL';
+ 
+ // Request custom OAuth credentials for the user
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000000000000000000000000000000000000..831c2b11f61599d75476019f3ef86decd4e8aa2c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+oauth-fix.patch