Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
YouTube Security VideosTechLinked: Apple says no more upgradeability(25.09.2026 um 01:02 Uhr)
•
Podcasts & Audio BriefingsiPhone 18, iPhone Duo und AirPods auf dem Prüfstand | CHIP.Chat #44(25.09.2026 um 00:00 Uhr)
•
YouTube Security VideosGoogle Cloud Tech: A Developer’s Guide to Gemini 3.5 Transcribe(25.09.2026 um 01:00 Uhr)
••••••••
YouTube Security VideosTechLinked: Apple says no more upgradeability(25.09.2026 um 01:02 Uhr)
•
Podcasts & Audio BriefingsiPhone 18, iPhone Duo und AirPods auf dem Prüfstand | CHIP.Chat #44(25.09.2026 um 00:00 Uhr)
•
YouTube Security VideosGoogle Cloud Tech: A Developer’s Guide to Gemini 3.5 Transcribe(25.09.2026 um 01:00 Uhr)
••••••••
Intelligence View
⚡ tsecurity.de Intelligence

How to build a Private Link Sharing App Using Next.js

Introduction In one of my recent projects, I needed to manage user permissions to access private & sensitive contents. But while implementing the solution, I struggled a lot. After researching the problem, I found a solution that…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Introduction



In one of my recent projects, I needed to manage user permissions to access private & sensitive contents. But while implementing the solution, I struggled a lot.



After researching the problem, I found a solution that resolved the issue. That’s when I thought of writing this article.



In this article, we will be building a private link-sharing app using Next.js and Permit.io. Through the implementation, we will explore how to handle access requests, manage approvals, and enforce permissions to protect sensitive data.






Prerequisites



To build this application, we will be using Next.js with “Permit Share-If,” which simplifies permission management. “Permit Share-If” is a suite of prebuilt, embeddable UI components that make access sharing in applications a breeze.



Before moving on to the main part, make sure you know the basics of Next.js structure. If you want, you can read more from here



To implement Permit.io into the Next.js application, you first need to set up Permit.io. Let’s begin








Setup Next.js project



To get started, let’s create a Next.js project.




  • Open a terminal and paste the command to create a new Next.js project.




npx create-next-app@latest .






  • Next, we’ll Install the required dependencies



npm install @permitio/permit-js dotenv permitio






  • Now we will create a.env file to store ENV & JWT secrets.



// .env
ENV=<permit env key>
JWT=<your JWT key>





Now that the app is ready to go, we’ve successfully built the project.





Add the Access request Element



To create an access request element, you first need to create a user management element. Let’s create it.




  • Go to the Elements section of the permit dashboard

  • Click on “Create Element.” option Under the User Management



user management element




  • Set up the user management element by following these steps:


    • Add a name, i.e. “User Management.”

    • Choose the RBAC role

    • Move the admin role from the ”Hidden Roles” section to “Level 1 - Workspace Owner.”

    • And last, create the element.









User management creation is complete; let’s jump onto the next part.




  • Click on the Elements option

  • Under the Access request, click on “Create Element.”



Access request element




  • Choose the user management element you want to connect.

  • Customize the element as needed









Implement the Access Request Element within the application.




  1. Create a component called Linklist for our project


    • The Linklist component displays a list of links and provides an option to delete any of them.

    • The components render an unordered list with a delete button.





// src/components/Linklist.jsx
const LinkList=({ links, deleteLink }) => {
return (
<ul>
{links.map((link, index) => (
<li key={index}>
<a href={link} target="_blank" rel="noopener noreferrer">{link}</a>
<button onClick={() => deleteLink(index)}>Delete</button>
</li>
))}
</ul>
);
};

export default LinkList;






  1. Create a component named Linkform for adding links by users.



// src/components/Linkform.jsx
import { useState } from 'react';

const LinkForm=({ addLink }) => {
const [url, setUrl] = useState('');

const handleSubmit = (e) => {
e.preventDefault();
if (url) {
addLink(url);
setUrl('');
}
};

return (
<form onSubmit={handleSubmit}>
<input className='text-black'
type="url"
value={url}
onChange={(e) => setUrl(e.target.value)}
placeholder="Enter URL"

required
/>
<button type="submit">Add Link</button>
</form>
);
};

export default LinkForm;






Here, when a user triggers the Add Link button, it will add links.




  1. Now we have to create another component for user management named UserManagement.jsx



import React from 'react'

function UserManagement() {
return (
<iframe
title="Permit Element user-management"
src="https://embed.permit.io/user-management?envId=e0ffba3632274e8085d92c793d34f0c1&darkMode=false"
width="100%"
height="100%"
/>
)
}

export default UserManagement;






  1. Now we have to create another components for access request named AccessRequest.jsx



import React from 'react'

function AccessRequest() {
return (
<iframe
title="Permit Element AR"
src="https://embed.permit.io/ar?envId=e0ffba3632274e8085d92c793d34f0c1&darkMode=false&tenantKey=default"
width="100%"
height="100%"
style={{ border: 'none' }}
/>
)
}

export default AccessRequest;






  1. Next, Create another component for Dashboard that will use Permit Share-If



// src/components/Dashboard.jsx

'use client';
import permit, { LoginMethod } from '@permitio/permit-js';
import 'dotenv/config';
import { useRouter } from 'next/navigation';
import { useEffect, useState } from 'react';

const Dashboard = () => {
const router=useRouter();
const [authenticated, setAuthenticated]=useState(false);

useEffect(() => {
const login=async () => {
try {
await permit.elements.login({
loginMethod: LoginMethod.frontendOnly,
userJwt: process.env.NEXT_PUBLIC_JWT,
tenant: 'default',
envId: process.env.NEXT_PUBLIC_ENV,
});
console.log('Login successful');
setAuthenticated(true);
} catch (err) {
console.error('Login error:', err);
}
};

if (process.env.NEXT_PUBLIC_JWT&&process.env.NEXT_PUBLIC_ENV) {
login();
} else {
console.error('JWT token or ENV variable is not defined.');
}
}, []);

useEffect(() => {
if (authenticated) {
router.push('/links');
}
}, [authenticated, router]);

return (
<AccessRequest />
<UserManagement />

);
};

export default Dashboard;






Here we have implemented auth, redirection & rendering now let’s understand a little bit about these

Authentication Handling
: a login function that tries to authenticate the user using permit.elements.login.Uses process.env.NEXT_PUBLIC_JWT and process.env.NEXT_PUBLIC_ENV from environment variables for authentication.




If authentication succeeds, it updates the state to indicate that the user is authenticated. Logs a success message or an error message if authentication fails.



Redirection: When authentication is successful, the component redirects the user to the /links page.




Rendering: Displays two different iframe by calling the components that embeds access request element from Permit.io.




Now we have to call the AccessRequest component on the page.js file



import Dashboard from '../components/Dashboard';

export default function Home() {
return (
<div>
<h1>Private Link Sharing App</h1>
<Dashboard/>

</div>
);
}






Lastly, implement the link page route that will handle the link page.



// src/app/links/page.jsx
'use client';
import LinkForm from '@/components/Linkform';
import LinkList from '@/components/Linklist';
import { useState } from 'react';

const Links=() => {
const [links, setLinks] = useState([]);

const addLink=(url) => {
setLinks([...links, url]);
};

const deleteLink = (index) => {
setLinks(links.filter((_, i) => i!==index));
};

return (
<div className='p-5'>
<h1>Manage Links</h1>
<LinkForm addLink={addLink} />
<LinkList links={links} deleteLink={deleteLink} />
</div>
);
};

export default Links;






With that, our application is fully complete.





Conclusion



By reading this guide, you have understood how to create a private link-sharing app using Next.js and Permit.io. You read about making access requests, approving the users, and permissions to be implemented to protect your private information.



If you want to explore and build more similar tools using Permit, check out their latest Product Hunt launch, “Permit Share-If,” and find out more about it.







Permit Share-If - Embeddable access sharing components | Product Hunt



“Permit Share-If” is a suite of prebuilt, embeddable UI components that make access sharing in applications a breeze. Designed to provide fully functional access control, they make delegating permission management to your users simple and safe.



favicon
producthunt.com






Also, if you have any questions, feel free to write them in the comments.



Happy Coding!

IoC Intelligence (1 Indikatoren)
e0ffba3632274e8085d92c793d34f0c1
SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - How to build a Private Link Sharing App Using Next.js
id: 9f4b76c4-f15a-491e-92bb-0530190edf34
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-25
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-25"
        description = "YARA Signature for "
    strings:
        $str = "How to build a Private Link Sh" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("How to build a Private Link Sharing App ")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*How to build a Private Link Sharing App *"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "How to build a Private Link Sharing App "
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich How to build a Private Link Sharing App .... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to build a Private Link Sharing App Using Next.js

Thematisch verwandte Begriffe: build, Private, Link, Sharing · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-87722 | Uncontrolled Resource Consumption (CWE-400 / CWE-1333) in regex search q…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel • Rechts: nächster Artikel • unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...
↗ Original-Quelle