[{"data":1,"prerenderedAt":234},["ShallowReactive",2],{"term-a\u002Fauthentication":3,"related-a\u002Fauthentication":214},{"id":4,"title":5,"acronym":6,"body":7,"category":193,"description":194,"difficulty":195,"extension":196,"letter":197,"meta":198,"navigation":199,"path":200,"related":201,"seo":207,"sitemap":208,"stem":211,"subcategory":212,"__hash__":213},"terms\u002Fterms\u002Fa\u002Fauthentication.md","Authentication","AuthN",{"type":8,"value":9,"toc":187},"minimark",[10,15,19,23,26,30,176,180,183],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"Authentication is proving you are who you say you are. It's the bouncer at the club checking your ID — not deciding if you can go to the VIP area, just making sure you're actually you. Username and password? That's authentication.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25],{},"Authentication is the process of verifying the identity of a user, system, or entity. It confirms that credentials (passwords, tokens, certificates) match a known identity before granting access to a system.",[11,27,29],{"id":28},"show-me-the-code","Show Me The Code",[31,32,37],"pre",{"className":33,"code":34,"language":35,"meta":36,"style":36},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Checking a user's credentials\nconst user = await db.users.findOne({ email });\nconst isValid = await bcrypt.compare(password, user.passwordHash);\nif (!isValid) throw new Error('Authentication failed');\n","javascript","",[38,39,40,49,101,137],"code",{"__ignoreMap":36},[41,42,45],"span",{"class":43,"line":44},"line",1,[41,46,48],{"class":47},"sHwdD","\u002F\u002F Checking a user's credentials\n",[41,50,52,56,60,64,68,71,74,77,79,83,86,89,92,95,98],{"class":43,"line":51},2,[41,53,55],{"class":54},"spNyl","const",[41,57,59],{"class":58},"sTEyZ"," user ",[41,61,63],{"class":62},"sMK4o","=",[41,65,67],{"class":66},"s7zQu"," await",[41,69,70],{"class":58}," db",[41,72,73],{"class":62},".",[41,75,76],{"class":58},"users",[41,78,73],{"class":62},[41,80,82],{"class":81},"s2Zo4","findOne",[41,84,85],{"class":58},"(",[41,87,88],{"class":62},"{",[41,90,91],{"class":58}," email ",[41,93,94],{"class":62},"}",[41,96,97],{"class":58},")",[41,99,100],{"class":62},";\n",[41,102,104,106,109,111,113,116,118,121,124,127,130,132,135],{"class":43,"line":103},3,[41,105,55],{"class":54},[41,107,108],{"class":58}," isValid ",[41,110,63],{"class":62},[41,112,67],{"class":66},[41,114,115],{"class":58}," bcrypt",[41,117,73],{"class":62},[41,119,120],{"class":81},"compare",[41,122,123],{"class":58},"(password",[41,125,126],{"class":62},",",[41,128,129],{"class":58}," user",[41,131,73],{"class":62},[41,133,134],{"class":58},"passwordHash)",[41,136,100],{"class":62},[41,138,140,143,146,149,152,155,158,161,163,166,170,172,174],{"class":43,"line":139},4,[41,141,142],{"class":66},"if",[41,144,145],{"class":58}," (",[41,147,148],{"class":62},"!",[41,150,151],{"class":58},"isValid) ",[41,153,154],{"class":66},"throw",[41,156,157],{"class":62}," new",[41,159,160],{"class":81}," Error",[41,162,85],{"class":58},[41,164,165],{"class":62},"'",[41,167,169],{"class":168},"sfazB","Authentication failed",[41,171,165],{"class":62},[41,173,97],{"class":58},[41,175,100],{"class":62},[11,177,179],{"id":178},"when-youll-hear-this","When You'll Hear This",[16,181,182],{},"\"We need to add authentication to the API.\" \u002F \"Authentication failed — wrong password.\"",[184,185,186],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":36,"searchDepth":51,"depth":51,"links":188},[189,190,191,192],{"id":13,"depth":51,"text":14},{"id":21,"depth":51,"text":22},{"id":28,"depth":51,"text":29},{"id":178,"depth":51,"text":179},"security","Authentication is proving you are who you say you are.","beginner","md","a",{},true,"\u002Fterms\u002Fa\u002Fauthentication",[202,203,204,205,206],"Authorization","Password Manager","Two-Factor Authentication","Session Hijacking","Token",{"title":5,"description":194},{"changefreq":209,"priority":210},"weekly",0.7,"terms\u002Fa\u002Fauthentication",null,"SSD9yNRYBikFDSFhCMcNZUQT0AKpUjrd5tvRtY8amnc",[215,219,222,226,230],{"title":202,"path":216,"acronym":217,"category":193,"difficulty":195,"description":218},"\u002Fterms\u002Fa\u002Fauthorization","AuthZ","Authorization is deciding what you're allowed to do after you've proven who you are.",{"title":203,"path":220,"acronym":212,"category":193,"difficulty":195,"description":221},"\u002Fterms\u002Fp\u002Fpassword-manager","A password manager remembers all your passwords so you don't have to reuse the same one everywhere.",{"title":205,"path":223,"acronym":212,"category":193,"difficulty":224,"description":225},"\u002Fterms\u002Fs\u002Fsession-hijacking","intermediate","Session hijacking is when an attacker steals your session cookie or token and impersonates you.",{"title":206,"path":227,"acronym":212,"category":228,"difficulty":195,"description":229},"\u002Fterms\u002Ft\u002Ftoken","vibecoding","In AI-land, a token is a chunk of text — roughly 3\u002F4 of a word.",{"title":204,"path":231,"acronym":232,"category":193,"difficulty":195,"description":233},"\u002Fterms\u002Ft\u002Ftwo-factor-authentication","2FA","2FA means you need two things to log in: something you know (password) and something you have (your phone).",1776518256745]