mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
fix authentication issue
This commit is contained in:
@@ -30,9 +30,10 @@ export default function TranscriptDetails(details: TranscriptDetails) {
|
||||
const topics = useTopics(api, transcriptId);
|
||||
const waveform = useWaveform(api, transcriptId);
|
||||
const useActiveTopic = useState<Topic | null>(null);
|
||||
const requireLogin = featureEnabled("requireLogin");
|
||||
|
||||
useEffect(() => {
|
||||
if (featureEnabled("requireLogin") && !isAuthenticated) return;
|
||||
if (requireLogin && !isAuthenticated) return;
|
||||
setTranscriptId(details.params.transcriptId);
|
||||
}, [api]);
|
||||
|
||||
|
||||
@@ -62,24 +62,12 @@ export const getFiefAuth = async (url: URL) => {
|
||||
|
||||
export const getFiefAuthMiddleware = async (url) => {
|
||||
const protectedPaths = [
|
||||
{
|
||||
matcher: "/:domain/transcripts",
|
||||
parameters: {},
|
||||
},
|
||||
{
|
||||
matcher: "/:domain/transcripts/:path*",
|
||||
parameters: {},
|
||||
},
|
||||
{
|
||||
matcher: "/:domain/browse",
|
||||
parameters: {},
|
||||
},
|
||||
{
|
||||
matcher: "/transcripts",
|
||||
parameters: {},
|
||||
},
|
||||
{
|
||||
matcher: "/transcripts/:path*",
|
||||
matcher: "/transcripts/((?!new).*)",
|
||||
parameters: {},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user