---
title: "Discussion on \"How to Prevent IDOR Vulnerabilities in Next.js API Routes\" | Hashnode"
description: "Discussion on \"How to Prevent IDOR Vulnerabilities in Next.js API Routes\". Imagine this situation: A user logs in successfully to your application, but upon loading their dashboard, they see someone else’s data.\nWhy does this happen? The authentication worked, the session is"
url: "https://hashnode.com/posts/prevent-idor-in-nextjs/69a1f073d4053a09f3430559"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Prevent IDOR Vulnerabilities in Next.js API Routes](https://freecodecamp.org/news/prevent-idor-in-nextjs?utm_source=hashnode&utm_medium=feed)

Imagine this situation: A user logs in successfully to your application, but upon loading their dashboard, they see someone else’s data. Why does this happen? The authentication worked, the session is

Feb 27 · 9 min read · freecodecamp.org  
Read the article

-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#security](https://hashnode.com/tag/security)
-   [#authentication](https://hashnode.com/tag/authentication)
-   [#authorization](https://hashnode.com/tag/authorization)

## Written by

[Ayodele Aransiola](https://hashnode.com/@leomofthings)

@leomofthings · London, England, GB

  
[View profile](https://hashnode.com/@leomofthings)

Developer Advocate

Developer Advocate

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
