I’m using Firebase for authentication in my application and I need to restrict each user to being logged in on a max of two browsers at any given time
‘use client’; import React, { useContext, createContext, useState, useEffect } from ‘react’; import { setPersistence, signInWithEmailAndPassword, signOut, onAuthStateChanged, User, browserSessionPersistence, } from ‘firebase/auth’; import Loading from ‘../components/pages/Loading’; import { doc, collection, getDocs, setDoc, deleteDoc, orderBy, limit, query } from ‘firebase/firestore’; import { auth, firestore } from ‘../firebase-config’; export interface AuthContextType { user: User | null; […]