draft-ietf-oauth-v2-1-15.txt 224 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600
  1. OAuth Working Group D. Hardt
  2. Internet-Draft Hellō
  3. Intended status: Standards Track A. Parecki
  4. Expires: 3 September 2026 Okta
  5. T. Lodderstedt
  6. SPRIND
  7. 2 March 2026
  8. The OAuth 2.1 Authorization Framework
  9. draft-ietf-oauth-v2-1-15
  10. Abstract
  11. The OAuth 2.1 authorization framework enables an application to
  12. obtain limited access to a protected resource, either on behalf of a
  13. resource owner by orchestrating an approval interaction between the
  14. resource owner and an authorization service, or by allowing the
  15. application to obtain access on its own behalf. This specification
  16. replaces and obsoletes the OAuth 2.0 Authorization Framework
  17. described in RFC 6749 and the Bearer Token Usage in RFC 6750.
  18. Discussion Venues
  19. This note is to be removed before publishing as an RFC.
  20. Discussion of this document takes place on the OAuth Working Group
  21. mailing list (oauth@ietf.org), which is archived at
  22. https://mailarchive.ietf.org/arch/browse/oauth/.
  23. Source for this draft and an issue tracker can be found at
  24. https://github.com/oauth-wg/oauth-v2-1.
  25. Status of This Memo
  26. This Internet-Draft is submitted in full conformance with the
  27. provisions of BCP 78 and BCP 79.
  28. Internet-Drafts are working documents of the Internet Engineering
  29. Task Force (IETF). Note that other groups may also distribute
  30. working documents as Internet-Drafts. The list of current Internet-
  31. Drafts is at https://datatracker.ietf.org/drafts/current/.
  32. Internet-Drafts are draft documents valid for a maximum of six months
  33. and may be updated, replaced, or obsoleted by other documents at any
  34. time. It is inappropriate to use Internet-Drafts as reference
  35. material or to cite them other than as "work in progress."
  36. Hardt, et al. Expires 3 September 2026 [Page 1]
  37. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  38. This Internet-Draft will expire on 3 September 2026.
  39. Copyright Notice
  40. Copyright (c) 2026 IETF Trust and the persons identified as the
  41. document authors. All rights reserved.
  42. This document is subject to BCP 78 and the IETF Trust's Legal
  43. Provisions Relating to IETF Documents (https://trustee.ietf.org/
  44. license-info) in effect on the date of publication of this document.
  45. Please review these documents carefully, as they describe your rights
  46. and restrictions with respect to this document. Code Components
  47. extracted from this document must include Revised BSD License text as
  48. described in Section 4.e of the Trust Legal Provisions and are
  49. provided without warranty as described in the Revised BSD License.
  50. Table of Contents
  51. 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5
  52. 1.1. Roles . . . . . . . . . . . . . . . . . . . . . . . . . . 7
  53. 1.2. Protocol Flow . . . . . . . . . . . . . . . . . . . . . . 8
  54. 1.3. Authorization Grant . . . . . . . . . . . . . . . . . . . 10
  55. 1.3.1. Authorization Code . . . . . . . . . . . . . . . . . 10
  56. 1.3.2. Refresh Token . . . . . . . . . . . . . . . . . . . . 10
  57. 1.3.3. Client Credentials . . . . . . . . . . . . . . . . . 12
  58. 1.4. Access Token . . . . . . . . . . . . . . . . . . . . . . 13
  59. 1.4.1. Access Token Scope . . . . . . . . . . . . . . . . . 14
  60. 1.4.2. Bearer Tokens . . . . . . . . . . . . . . . . . . . . 15
  61. 1.4.3. Sender-Constrained Access Tokens . . . . . . . . . . 16
  62. 1.5. Communication security . . . . . . . . . . . . . . . . . 16
  63. 1.6. HTTP Redirections . . . . . . . . . . . . . . . . . . . . 17
  64. 1.7. Interoperability . . . . . . . . . . . . . . . . . . . . 17
  65. 1.8. Compatibility with OAuth 2.0 . . . . . . . . . . . . . . 17
  66. 1.9. Notational Conventions . . . . . . . . . . . . . . . . . 18
  67. 2. Client Registration . . . . . . . . . . . . . . . . . . . . . 18
  68. 2.1. Client Types . . . . . . . . . . . . . . . . . . . . . . 19
  69. 2.2. Client Identifier . . . . . . . . . . . . . . . . . . . . 21
  70. 2.3. Client Redirection Endpoint . . . . . . . . . . . . . . . 21
  71. 2.3.1. Registration Requirements . . . . . . . . . . . . . . 21
  72. 2.3.2. Multiple Redirect URIs . . . . . . . . . . . . . . . 22
  73. 2.3.3. Preventing CSRF Attacks . . . . . . . . . . . . . . . 23
  74. 2.3.4. Preventing Mix-Up Attacks . . . . . . . . . . . . . . 23
  75. 2.3.5. Invalid Endpoint . . . . . . . . . . . . . . . . . . 23
  76. 2.3.6. Endpoint Content . . . . . . . . . . . . . . . . . . 23
  77. 2.4. Client Authentication . . . . . . . . . . . . . . . . . . 24
  78. 2.4.1. Client Secret . . . . . . . . . . . . . . . . . . . . 25
  79. 2.4.2. Other Authentication Methods . . . . . . . . . . . . 26
  80. 2.5. Unregistered Clients . . . . . . . . . . . . . . . . . . 26
  81. Hardt, et al. Expires 3 September 2026 [Page 2]
  82. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  83. 3. Protocol Endpoints . . . . . . . . . . . . . . . . . . . . . 26
  84. 3.1. Authorization Endpoint . . . . . . . . . . . . . . . . . 27
  85. 3.2. Token Endpoint . . . . . . . . . . . . . . . . . . . . . 28
  86. 3.2.1. Client Authentication . . . . . . . . . . . . . . . . 28
  87. 3.2.2. Token Endpoint Request . . . . . . . . . . . . . . . 29
  88. 3.2.3. Token Endpoint Response . . . . . . . . . . . . . . . 30
  89. 3.2.4. Token Endpoint Error Response . . . . . . . . . . . . 32
  90. 4. Grant Types . . . . . . . . . . . . . . . . . . . . . . . . . 33
  91. 4.1. Authorization Code Grant . . . . . . . . . . . . . . . . 33
  92. 4.1.1. Authorization Request . . . . . . . . . . . . . . . . 35
  93. 4.1.2. Authorization Response . . . . . . . . . . . . . . . 39
  94. 4.1.3. Token Endpoint Extension . . . . . . . . . . . . . . 42
  95. 4.2. Client Credentials Grant . . . . . . . . . . . . . . . . 43
  96. 4.2.1. Token Endpoint Extension . . . . . . . . . . . . . . 44
  97. 4.3. Refresh Token Grant . . . . . . . . . . . . . . . . . . . 44
  98. 4.3.1. Token Endpoint Extension . . . . . . . . . . . . . . 45
  99. 4.3.2. Refresh Token Response . . . . . . . . . . . . . . . 46
  100. 4.3.3. Refresh Token Recommendations . . . . . . . . . . . . 47
  101. 4.4. Extension Grants . . . . . . . . . . . . . . . . . . . . 47
  102. 5. Resource Requests . . . . . . . . . . . . . . . . . . . . . . 48
  103. 5.1. Bearer Token Requests . . . . . . . . . . . . . . . . . . 48
  104. 5.1.1. Authorization Request Header Field . . . . . . . . . 48
  105. 5.1.2. Form-Encoded Content Parameter . . . . . . . . . . . 49
  106. 5.2. Access Token Validation . . . . . . . . . . . . . . . . . 50
  107. 5.3. Error Response . . . . . . . . . . . . . . . . . . . . . 50
  108. 5.3.1. The WWW-Authenticate Response Header Field . . . . . 51
  109. 5.3.2. Error Codes . . . . . . . . . . . . . . . . . . . . . 52
  110. 6. Extensibility . . . . . . . . . . . . . . . . . . . . . . . . 53
  111. 6.1. Defining Access Token Types . . . . . . . . . . . . . . . 53
  112. 6.1.1. Registered Access Token Types . . . . . . . . . . . . 53
  113. 6.1.2. Vendor-Specific Access Token Types . . . . . . . . . 54
  114. 6.2. Defining New Endpoint Parameters . . . . . . . . . . . . 54
  115. 6.3. Defining New Authorization Grant Types . . . . . . . . . 55
  116. 6.4. Defining New Authorization Endpoint Response Types . . . 55
  117. 6.5. Defining Additional Error Codes . . . . . . . . . . . . . 55
  118. 7. Security Considerations . . . . . . . . . . . . . . . . . . . 56
  119. 7.1. Access Token Security Considerations . . . . . . . . . . 56
  120. 7.1.1. Security Threats . . . . . . . . . . . . . . . . . . 56
  121. 7.1.2. Threat Mitigation . . . . . . . . . . . . . . . . . . 57
  122. 7.1.3. Summary of Recommendations . . . . . . . . . . . . . 57
  123. 7.1.4. Access Token Privilege Restriction . . . . . . . . . 59
  124. 7.2. Client Authentication . . . . . . . . . . . . . . . . . . 59
  125. 7.3. Client Impersonation . . . . . . . . . . . . . . . . . . 60
  126. 7.3.1. Impersonation of Native Apps . . . . . . . . . . . . 60
  127. 7.3.2. Access Token Privilege Restriction . . . . . . . . . 61
  128. 7.4. Client Impersonating Resource Owner . . . . . . . . . . . 61
  129. 7.5. Authorization Code Security Considerations . . . . . . . 62
  130. 7.5.1. Authorization Code Injection . . . . . . . . . . . . 62
  131. Hardt, et al. Expires 3 September 2026 [Page 3]
  132. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  133. 7.5.2. Reuse of Authorization Codes . . . . . . . . . . . . 63
  134. 7.5.3. HTTP 307 Redirect . . . . . . . . . . . . . . . . . . 64
  135. 7.6. Ensuring Endpoint Authenticity . . . . . . . . . . . . . 64
  136. 7.7. Credentials-Guessing Attacks . . . . . . . . . . . . . . 64
  137. 7.8. Phishing Attacks . . . . . . . . . . . . . . . . . . . . 65
  138. 7.9. Cross-Site Request Forgery . . . . . . . . . . . . . . . 65
  139. 7.10. Clickjacking . . . . . . . . . . . . . . . . . . . . . . 66
  140. 7.11. Injection and Input Validation . . . . . . . . . . . . . 67
  141. 7.12. Open Redirection . . . . . . . . . . . . . . . . . . . . 68
  142. 7.12.1. Client as Open Redirector . . . . . . . . . . . . . 68
  143. 7.12.2. Authorization Server as Open Redirector . . . . . . 68
  144. 7.13. Transport Security . . . . . . . . . . . . . . . . . . . 69
  145. 7.14. Authorization Server Mix-Up Mitigation . . . . . . . . . 70
  146. 7.14.1. Mix-Up Defense via Issuer Identification . . . . . . 70
  147. 7.14.2. Mix-Up Defense via Distinct Redirect URIs . . . . . 71
  148. 8. Native Applications . . . . . . . . . . . . . . . . . . . . . 71
  149. 8.1. Client Authentication of Native Apps . . . . . . . . . . 73
  150. 8.1.1. Registration of Native App Clients . . . . . . . . . 73
  151. 8.1.2. Native App Attestation . . . . . . . . . . . . . . . 73
  152. 8.2. Using Inter-App URI Communication for OAuth in Native
  153. Apps . . . . . . . . . . . . . . . . . . . . . . . . . . 73
  154. 8.3. Initiating the Authorization Request from a Native App . 74
  155. 8.4. Receiving the Authorization Response in a Native App . . 75
  156. 8.4.1. Claimed "https" Scheme URI Redirection . . . . . . . 75
  157. 8.4.2. Loopback Interface Redirection . . . . . . . . . . . 75
  158. 8.4.3. Private-Use URI Scheme Redirection . . . . . . . . . 76
  159. 8.5. Security Considerations in Native Apps . . . . . . . . . 77
  160. 8.5.1. Embedded User Agents in Native Apps . . . . . . . . . 77
  161. 8.5.2. Fake External User-Agents in Native Apps . . . . . . 78
  162. 8.5.3. Malicious External User-Agents in Native Apps . . . . 79
  163. 8.5.4. Loopback Redirect Considerations in Native Apps . . . 79
  164. 9. Browser-Based Apps . . . . . . . . . . . . . . . . . . . . . 79
  165. 10. Differences from OAuth 2.0 . . . . . . . . . . . . . . . . . 80
  166. 10.1. Removal of the OAuth 2.0 Implicit grant . . . . . . . . 80
  167. 10.2. Redirect URI Parameter in Token Request . . . . . . . . 81
  168. 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 82
  169. 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 82
  170. 12.1. Normative References . . . . . . . . . . . . . . . . . . 82
  171. 12.2. Informative References . . . . . . . . . . . . . . . . . 84
  172. Appendix A. Augmented Backus-Naur Form (ABNF) Syntax . . . . . . 88
  173. A.1. "client_id" Syntax . . . . . . . . . . . . . . . . . . . 88
  174. A.2. "client_secret" Syntax . . . . . . . . . . . . . . . . . 88
  175. A.3. "response_type" Syntax . . . . . . . . . . . . . . . . . 88
  176. A.4. "scope" Syntax . . . . . . . . . . . . . . . . . . . . . 88
  177. A.5. "state" Syntax . . . . . . . . . . . . . . . . . . . . . 89
  178. A.6. "redirect_uri" Syntax . . . . . . . . . . . . . . . . . . 89
  179. A.7. "error" Syntax . . . . . . . . . . . . . . . . . . . . . 89
  180. A.8. "error_description" Syntax . . . . . . . . . . . . . . . 89
  181. Hardt, et al. Expires 3 September 2026 [Page 4]
  182. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  183. A.9. "error_uri" Syntax . . . . . . . . . . . . . . . . . . . 89
  184. A.10. "grant_type" Syntax . . . . . . . . . . . . . . . . . . . 89
  185. A.11. "code" Syntax . . . . . . . . . . . . . . . . . . . . . . 90
  186. A.12. "access_token" Syntax . . . . . . . . . . . . . . . . . . 90
  187. A.13. "token_type" Syntax . . . . . . . . . . . . . . . . . . . 90
  188. A.14. "expires_in" Syntax . . . . . . . . . . . . . . . . . . . 90
  189. A.15. "refresh_token" Syntax . . . . . . . . . . . . . . . . . 90
  190. A.16. Endpoint Parameter Syntax . . . . . . . . . . . . . . . . 90
  191. A.17. "code_verifier" Syntax . . . . . . . . . . . . . . . . . 90
  192. A.18. "code_challenge" Syntax . . . . . . . . . . . . . . . . . 91
  193. Appendix B. Use of application/x-www-form-urlencoded Media
  194. Type . . . . . . . . . . . . . . . . . . . . . . . . . . 91
  195. Appendix C. Serializations . . . . . . . . . . . . . . . . . . . 92
  196. C.1. Query String Serialization . . . . . . . . . . . . . . . 92
  197. C.2. Form-Encoded Serialization . . . . . . . . . . . . . . . 92
  198. C.3. JSON Serialization . . . . . . . . . . . . . . . . . . . 92
  199. Appendix D. Extensions . . . . . . . . . . . . . . . . . . . . . 92
  200. Appendix E. Acknowledgements . . . . . . . . . . . . . . . . . . 94
  201. Appendix F. Document History . . . . . . . . . . . . . . . . . . 95
  202. Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 100
  203. 1. Introduction
  204. OAuth introduces an authorization layer to the client-server
  205. authentication model by separating the role of the client from that
  206. of the resource owner. In OAuth, the client requests access to
  207. resources controlled by the resource owner and hosted by the resource
  208. server. Instead of using the resource owner's credentials to access
  209. protected resources, the client obtains an access token - a
  210. credential representing a specific set of access attributes such as
  211. scope and lifetime. Access tokens are issued to clients by an
  212. authorization server with the approval of the resource owner. The
  213. client uses the access token to access the protected resources hosted
  214. by the resource server.
  215. In the older, more limited client-server authentication model, the
  216. client requests an access-restricted resource (protected resource) on
  217. the server by authenticating to the server using the resource owner's
  218. credentials. In order to provide applications access to restricted
  219. resources, the resource owner shares their credentials with the
  220. application. This creates several problems and limitations:
  221. * Applications are required to store the resource owner's
  222. credentials for future use, typically a password in clear-text.
  223. * Servers are required to support password authentication, despite
  224. the security weaknesses inherent in passwords.
  225. Hardt, et al. Expires 3 September 2026 [Page 5]
  226. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  227. * Applications gain overly broad access to the resource owner's
  228. protected resources, leaving resource owners without any ability
  229. to restrict duration or access to a limited subset of resources.
  230. * Resource owners often reuse passwords with other unrelated
  231. services, despite best security practices. This password reuse
  232. means a vulnerability or exposure in one service may have security
  233. implications in completely unrelated services.
  234. * Resource owners cannot revoke access to an individual application
  235. without revoking access to all third parties, and must do so by
  236. changing their password.
  237. * Compromise of any application results in compromise of the end-
  238. user's password and all of the data protected by that password.
  239. An example where OAuth is used is where an end user (resource owner)
  240. grants a financial management service (client) access to their
  241. sensitive transaction history stored at a banking service (resource
  242. server), without sharing their username and password with the
  243. financial management service. Instead, they authenticate directly
  244. with their financial institution's server (authorization server),
  245. which issues the financial management service delegation-specific
  246. credentials (access token).
  247. This separation of concerns also provides the ability to use more
  248. advanced user authentication methods such as multi-factor
  249. authentication and even passwordless authentication, without any
  250. modification to the applications. With all user authentication logic
  251. handled by the authorization server, applications don't need to be
  252. concerned with the specifics of implementing any particular
  253. authentication mechanism. This provides the ability for the
  254. authorization server to manage the user authentication policies and
  255. even change them in the future without coordinating the changes with
  256. applications.
  257. Hardt, et al. Expires 3 September 2026 [Page 6]
  258. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  259. The authorization layer can also simplify how a resource server
  260. determines if a request is authorized. Traditionally, after
  261. authenticating the client, each resource server would evaluate
  262. policies to compute if the client is authorized on each API call. In
  263. a distributed system, the policies need to be synchronized to all the
  264. resource servers, or the resource server must call a central policy
  265. server to process each request. In OAuth, evaluation of the policies
  266. is performed only when a new access token is created by the
  267. authorization server. If the authorized access is represented in the
  268. access token, the resource server no longer needs to evaluate the
  269. policies, and only needs to validate the access token. This
  270. simplification applies when the application is acting on behalf of a
  271. resource owner, or on behalf of itself.
  272. OAuth is an authorization protocol, not an authentication protocol,
  273. as OAuth does not define the necessary components to achieve user
  274. authentication. An authentication protocol is necessary if the goal
  275. is to authenticate users. An example is OpenID Connect
  276. [OpenID.Connect], which builds on OAuth to provide the security
  277. characteristics and necessary components required of an
  278. authentication protocol.
  279. The access token represents the authorization granted to the client.
  280. It is a common practice for the client to present the access token to
  281. a proprietary API which returns a user identifier for the resource
  282. owner, and then using the result of the API as a proxy for
  283. authenticating the user. This practice is not part of the OAuth
  284. standard or security considerations, and may not have been considered
  285. by the resource owner. Implementors should carefully consult the
  286. documentation of the resource server before adopting this practice.
  287. This specification is designed for use with HTTP [RFC9110]. The use
  288. of OAuth over any protocol other than HTTP is out of scope.
  289. Since the publication of the OAuth 2.0 Authorization Framework
  290. [RFC6749] in October 2012, it has been updated by OAuth 2.0 for
  291. Native Apps [RFC8252], OAuth Security Best Current Practice
  292. [RFC9700], and OAuth 2.0 for Browser-Based Apps
  293. [I-D.ietf-oauth-browser-based-apps]. The OAuth 2.0 Authorization
  294. Framework: Bearer Token Usage [RFC6750] has also been updated with
  295. [RFC9700]. This Standards Track specification consolidates the
  296. information in all of these documents and removes features that have
  297. been found to be insecure in [RFC9700].
  298. 1.1. Roles
  299. OAuth defines four roles:
  300. Hardt, et al. Expires 3 September 2026 [Page 7]
  301. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  302. "resource owner": An entity capable of granting access to a
  303. protected resource. When the resource owner is a person, it is
  304. referred to as an end user. This is sometimes abbreviated as
  305. "RO".
  306. "resource server": The server hosting the protected resources,
  307. capable of accepting and responding to protected resource requests
  308. using access tokens. The resource server is often accessible via
  309. an API. This is sometimes abbreviated as "RS".
  310. "client": An application making protected resource requests on
  311. behalf of the resource owner and with its authorization. The term
  312. "client" does not imply any particular implementation
  313. characteristics (e.g., whether the application executes on a
  314. server, a desktop, or other devices).
  315. "authorization server": The server issuing access tokens to the
  316. client after successfully authenticating the resource owner and
  317. obtaining authorization. This is sometimes abbreviated as "AS".
  318. Most of this specification defines the interaction between the client
  319. and the authorization server, as well as between the client and
  320. resource server.
  321. The interaction between the authorization server and resource server
  322. is beyond the scope of this specification, however several extensions
  323. have been defined to provide an option for interoperability between
  324. resource servers and authorization servers. The authorization server
  325. may be the same server as the resource server or a separate entity.
  326. A single authorization server may issue access tokens accepted by
  327. multiple resource servers.
  328. The interaction between the resource owner and authorization server
  329. (e.g. how the end user authenticates themselves at the authorization
  330. server) is also out of scope of this specification, with some
  331. exceptions, such as security considerations around prompting the end
  332. user for consent.
  333. When the resource owner is the end user, the user will interact with
  334. the client. When the client is a web-based application, the user
  335. will interact with the client through a user agent (as described in
  336. Section 3.5 of [RFC9110]). When the client is a native application,
  337. the user will interact with the client directly through the operating
  338. system. See Section 2.1 for further details.
  339. 1.2. Protocol Flow
  340. Hardt, et al. Expires 3 September 2026 [Page 8]
  341. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  342. +--------+ +---------------+
  343. | |--(1)- Authorization Request ->| Resource |
  344. | | | Owner |
  345. | |<-(2)-- Authorization Grant ---| |
  346. | | +---------------+
  347. | |
  348. | | +---------------+
  349. | |--(3)-- Authorization Grant -->| Authorization |
  350. | Client | | Server |
  351. | |<-(4)----- Access Token -------| |
  352. | | +---------------+
  353. | |
  354. | | +---------------+
  355. | |--(5)----- Access Token ------>| Resource |
  356. | | | Server |
  357. | |<-(6)--- Protected Resource ---| |
  358. +--------+ +---------------+
  359. Figure 1: Abstract Protocol Flow
  360. The abstract OAuth 2.1 flow illustrated in Figure 1 describes the
  361. interaction between the four roles and includes the following steps:
  362. 1. The client requests authorization from the resource owner. The
  363. authorization request can be made directly to the resource owner
  364. (as shown), or preferably indirectly via the authorization server
  365. as an intermediary.
  366. 2. The client receives an authorization grant, which is a credential
  367. representing the resource owner's authorization, expressed using
  368. one of the authorization grant types defined in this
  369. specification or using an extension grant type. The
  370. authorization grant type depends on the method used by the client
  371. to request authorization and the types supported by the
  372. authorization server.
  373. 3. The client requests an access token by authenticating with the
  374. authorization server and presenting the authorization grant.
  375. 4. The authorization server authenticates the client and validates
  376. the authorization grant, and if valid, issues an access token.
  377. 5. The client requests the protected resource from the resource
  378. server and authenticates by presenting the access token.
  379. 6. The resource server validates the access token, and if valid,
  380. serves the request.
  381. Hardt, et al. Expires 3 September 2026 [Page 9]
  382. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  383. The preferred method for the client to obtain an authorization grant
  384. from the resource owner (depicted in steps (1) and (2)) is to use the
  385. authorization server as an intermediary, which is illustrated in
  386. Figure 3 in Section 4.1.
  387. 1.3. Authorization Grant
  388. An authorization grant represents the resource owner's authorization
  389. (to access its protected resources) used by the client to obtain an
  390. access token. This specification defines three grant types --
  391. authorization code, refresh token, and client credentials -- as well
  392. as an extensibility mechanism for defining additional types.
  393. 1.3.1. Authorization Code
  394. An authorization code is a temporary credential used to obtain an
  395. access token. Instead of the client requesting authorization
  396. directly from the resource owner, the client directs the resource
  397. owner to an authorization server (via its user agent) which in turn
  398. directs the resource owner back to the client with the authorization
  399. code. The client can then exchange the authorization code for an
  400. access token.
  401. Before directing the resource owner back to the client with the
  402. authorization code, the authorization server authenticates the
  403. resource owner, and may request the resource owner's consent or
  404. otherwise inform them of the client's request. Because the resource
  405. owner only authenticates with the authorization server, the resource
  406. owner's credentials are never shared with the client, and the client
  407. does not need to have knowledge of any additional authentication
  408. steps such as multi-factor authentication or delegated accounts.
  409. The authorization code provides a few important security benefits,
  410. such as the ability to authenticate the client, as well as the
  411. transmission of the access token directly to the client without
  412. passing it through the resource owner's user agent and potentially
  413. exposing it to others, including the resource owner.
  414. 1.3.2. Refresh Token
  415. Refresh tokens are credentials used to obtain access tokens. Refresh
  416. tokens may be issued to the client by the authorization server and
  417. are used to obtain a new access token when the current access token
  418. becomes invalid or expires, or to obtain additional access tokens
  419. with identical or narrower scope (access tokens may have a shorter
  420. lifetime and fewer privileges than authorized by the resource owner).
  421. Issuing a refresh token is optional at the discretion of the
  422. authorization server, and may be issued based on properties of the
  423. Hardt, et al. Expires 3 September 2026 [Page 10]
  424. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  425. client, properties of the request, policies within the authorization
  426. server, or any other criteria. If the authorization server issues a
  427. refresh token, it is included when issuing an access token (i.e.,
  428. step (2) in Figure 2). The lifetime of the refresh token is also at
  429. the discretion of the authorization server.
  430. A refresh token is a string representing the authorization granted to
  431. the client by the resource owner. The string is considered opaque to
  432. the client. The refresh token may be an identifier used to retrieve
  433. the authorization information or may encode this information into the
  434. string itself. Unlike access tokens, refresh tokens are intended for
  435. use only with authorization servers and are never sent to resource
  436. servers.
  437. +--------+ +---------------+
  438. | |--(1)------- Authorization Grant --------->| |
  439. | | | |
  440. | |<-(2)----------- Access Token -------------| |
  441. | | & Refresh Token | |
  442. | | | |
  443. | | +----------+ | |
  444. | |--(3)---- Access Token ---->| | | |
  445. | | | | | |
  446. | |<-(4)- Protected Resource --| Resource | | Authorization |
  447. | Client | | Server | | Server |
  448. | |--(5)---- Access Token ---->| | | |
  449. | | | | | |
  450. | |<-(6)- Invalid Token Error -| | | |
  451. | | +----------+ | |
  452. | | | |
  453. | |--(7)----------- Refresh Token ----------->| |
  454. | | | |
  455. | |<-(8)----------- Access Token -------------| |
  456. +--------+ & Optional Refresh Token +---------------+
  457. Figure 2: Refreshing an Expired Access Token
  458. The flow illustrated in Figure 2 includes the following steps:
  459. 1. The client requests an access token by authenticating with the
  460. authorization server and presenting an authorization grant.
  461. 2. The authorization server authenticates the client and validates
  462. the authorization grant, and if valid, issues an access token and
  463. optionally a refresh token.
  464. 3. The client makes a protected resource request to the resource
  465. server by presenting the access token.
  466. Hardt, et al. Expires 3 September 2026 [Page 11]
  467. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  468. 4. The resource server validates the access token, and if valid,
  469. serves the request.
  470. 5. Steps (3) and (4) repeat until the access token expires. If the
  471. client knows the access token expired, it skips to step (7);
  472. otherwise, it makes another protected resource request.
  473. 6. Since the access token is invalid, the resource server returns an
  474. invalid token error.
  475. 7. The client requests a new access token by presenting the refresh
  476. token and providing client authentication if it has been issued
  477. credentials. The client authentication requirements are based on
  478. the client type and on the authorization server policies.
  479. 8. The authorization server authenticates the client and validates
  480. the refresh token, and if valid, issues a new access token (and,
  481. optionally, a new refresh token).
  482. Note that there is no need to communicate the lifetime of the refresh
  483. token to the client, because the client can't do anything different
  484. with the knowledge of the lifetime. Additionally, the authorization
  485. server might choose to use dynamic lifetimes (e.g. the refresh token
  486. expiry is extended as long as the refresh token is used at least once
  487. every 7 days), or the authorization server might revoke the refresh
  488. token before its scheduled expiration date for any reason, such as if
  489. the user revokes the application's access. This means the client
  490. already has to handle the case of a refresh token expiring at an
  491. arbitrary time.
  492. Regardless of why or when the refresh token expires, the client has
  493. only one path to obtain new tokens, which is to start a new OAuth
  494. flow from the beginning. For that reason, there is no property
  495. defined to communicate the expiration of a refresh token to the
  496. client.
  497. 1.3.3. Client Credentials
  498. The client credentials or other forms of client authentication (e.g.,
  499. a private key used to sign a JWT, as described in [RFC7523] and its
  500. update [I-D.ietf-oauth-rfc7523bis]) can be used as an authorization
  501. grant when the authorization scope is limited to the protected
  502. resources under the control of the client, or to protected resources
  503. previously arranged with the authorization server. Client
  504. credentials are used when the client is requesting access to
  505. protected resources based on an authorization previously arranged
  506. with the authorization server.
  507. Hardt, et al. Expires 3 September 2026 [Page 12]
  508. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  509. 1.4. Access Token
  510. Access tokens are credentials used to access protected resources. An
  511. access token is a string representing an authorization issued to the
  512. client.
  513. The string is considered opaque to the client, even if it has a
  514. structure. The client MUST NOT expect to be able to parse the access
  515. token value. The authorization server is not required to use a
  516. consistent access token encoding or format other than what is
  517. expected by the resource server.
  518. The access granted by the resource owner to the client is represented
  519. by the Access Token created by the authorization server. Access
  520. Tokens are short lived to reduce the blast radius of a leaked Access
  521. Token. The expiration of the Access Token is set by the
  522. authorization server.
  523. Depending on the authorization server implementation, the token
  524. string may be used by the resource server to retrieve the
  525. authorization information, or the token may self-contain the
  526. authorization information in a verifiable manner (i.e., a token
  527. string consisting of a signed data payload). One example of a token
  528. retrieval mechanism is Token Introspection [RFC7662], in which the RS
  529. calls an endpoint on the AS to validate the token presented by the
  530. client. One example of a structured token format is JWT Profile for
  531. Access Tokens [RFC9068], a method of encoding and signing access
  532. token data as a JSON Web Token [RFC7519].
  533. Additional authentication credentials, which are beyond the scope of
  534. this specification, may be required in order for the client to use an
  535. access token. This is typically referred to as a sender-constrained
  536. access token, such as DPoP [RFC9449] and Mutual TLS Certificate-Bound
  537. Access Tokens [RFC8705].
  538. The access token provides an abstraction layer, replacing different
  539. authorization constructs (e.g., username and password) with a single
  540. token understood by the resource server. This abstraction enables
  541. issuing access tokens more restrictive than the authorization grant
  542. used to obtain them, as well as removing the resource server's need
  543. to understand a wide range of authentication methods.
  544. Access tokens can have different formats, structures, and methods of
  545. utilization (e.g., cryptographic properties) based on the resource
  546. server security requirements. Access token attributes and the
  547. methods used to access protected resources may be extended beyond
  548. what is described in this specification.
  549. Hardt, et al. Expires 3 September 2026 [Page 13]
  550. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  551. Access tokens (as well as any confidential access token attributes)
  552. MUST be kept confidential in transit and storage, and only shared
  553. among the authorization server, the resource servers the access token
  554. is valid for, and the client to which the access token is issued.
  555. The authorization server MUST ensure that access tokens cannot be
  556. generated, modified, or guessed to produce valid access tokens by
  557. unauthorized parties.
  558. 1.4.1. Access Token Scope
  559. Access tokens are intended to be issued to clients with less
  560. privileges than the user granting the access has. This is known as a
  561. limited "scope" access token. The authorization server and resource
  562. server can use this scope mechanism to limit what types of resources
  563. or level of access a particular client can have.
  564. For example, a client may only need "read" access to a user's
  565. resources, but doesn't need to update resources, so the client can
  566. request the read-only scope defined by the authorization server, and
  567. obtain an access token that cannot be used to update resources. This
  568. requires coordination between the authorization server, resource
  569. server, and client. The authorization server provides the client the
  570. ability to request specific scopes, and associates those scopes with
  571. the access token issued to the client. The resource server is then
  572. responsible for enforcing scopes when presented with a limited-scope
  573. access token.
  574. OAuth does not define any scope values, instead scopes are defined by
  575. the authorization server or by extensions or profiles of OAuth. One
  576. such extension that defines scopes is [OpenID.Connect], which defines
  577. a set of scopes that provide granular access to a user's profile
  578. information. It is recommended to avoid defining custom scopes that
  579. conflict with scopes from known extensions.
  580. To request a limited-scope access token, the client uses the scope
  581. request parameter at the authorization or token endpoints, depending
  582. on the grant type used. In turn, the authorization server uses the
  583. scope response parameter to inform the client of the scope of the
  584. access token issued.
  585. The value of the scope parameter is expressed as a space- delimited
  586. list of case-sensitive strings. The strings are defined by the
  587. authorization server. If the value contains multiple space-delimited
  588. strings, their order does not matter, and each string adds an
  589. additional access range to the requested scope.
  590. Hardt, et al. Expires 3 September 2026 [Page 14]
  591. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  592. scope = scope-token *( SP scope-token )
  593. scope-token = 1*( %x21 / %x23-5B / %x5D-7E )
  594. The authorization server MAY fully or partially ignore the scope
  595. requested by the client, based on the authorization server policy or
  596. the resource owner's instructions. If the issued access token scope
  597. is different from the one requested by the client, the authorization
  598. server MUST include the scope response parameter in the token
  599. response (Section 3.2.3) to inform the client of the actual scope
  600. granted.
  601. If the client omits the scope parameter when requesting
  602. authorization, the authorization server MUST either process the
  603. request using a pre-defined default value or fail the request
  604. indicating an invalid scope. The authorization server SHOULD
  605. document its scope requirements and default value (if defined).
  606. 1.4.2. Bearer Tokens
  607. A Bearer Token is a security token with the property that any party
  608. in possession of the token (a "bearer") can use the token in any way
  609. that any other party in possession of it can. Using a Bearer Token
  610. does not require a bearer to prove possession of cryptographic key
  611. material (proof-of-possession).
  612. Bearer Tokens may be enhanced with proof-of-possession specifications
  613. such as DPoP [RFC9449] and mTLS [RFC8705] to provide proof-of-
  614. possession characteristics.
  615. To protect against access token disclosure, the communication
  616. interaction between the client and the resource server MUST utilize
  617. confidentiality and integrity protection as described in Section 1.5.
  618. There is no requirement on the particular structure or format of a
  619. bearer token. If a bearer token is a reference to authorization
  620. information, such references MUST be infeasible for an attacker to
  621. guess, such as using a sufficiently long cryptographically random
  622. string. If a bearer token uses an encoding mechanism to contain the
  623. authorization information in the token itself, the access token MUST
  624. use integrity protection sufficient to prevent the token from being
  625. modified. One example of an encoding and signing mechanism for
  626. access tokens is described in JSON Web Token Profile for Access
  627. Tokens [RFC9068].
  628. Hardt, et al. Expires 3 September 2026 [Page 15]
  629. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  630. 1.4.3. Sender-Constrained Access Tokens
  631. A sender-constrained access token binds the use of an access token to
  632. a specific sender. This sender is obliged to demonstrate knowledge
  633. of a certain secret as prerequisite for the acceptance of that access
  634. token at the recipient (e.g., a resource server).
  635. Authorization and resource servers SHOULD use mechanisms for sender-
  636. constraining access tokens, such as OAuth Demonstration of Proof of
  637. Possession (DPoP) [RFC9449] or Mutual TLS for OAuth 2.0 [RFC8705].
  638. See Section 4.10.1 of [RFC9700] to prevent misuse of stolen and
  639. leaked access tokens.
  640. It is RECOMMENDED to use end-to-end TLS between the client and the
  641. resource server. If TLS traffic needs to be terminated at an
  642. intermediary, refer to Section 4.13 of [RFC9700] for further security
  643. advice.
  644. 1.5. Communication security
  645. Implementations MUST use a mechanism to provide communication
  646. authentication, integrity and confidentiality such as Transport-Layer
  647. Security [RFC8446], to protect the exchange of clear-text credentials
  648. and tokens either in the content or in header fields from
  649. eavesdropping which enables replay (e.g., see Section 2.4.1,
  650. Section 7.5.1, Section 3.2, and Section 1.4.2).
  651. All the OAuth protocol URLs (URLs exposed by the AS, RS and Client)
  652. MUST use the https scheme except for loopback interface redirect
  653. URIs, which MAY use the http scheme. When using https, TLS
  654. certificates MUST be checked according to Section 4.3.4 of [RFC9110].
  655. At the time of this writing, TLS version 1.3 [RFC8446] is the most
  656. recent version.
  657. Implementations MAY also support additional transport-layer security
  658. mechanisms that meet their security requirements.
  659. The identification of the TLS versions and algorithms is outside the
  660. scope of this specification. Refer to [BCP195] for up to date
  661. recommendations on transport layer security, and to the relevant
  662. specifications for certificate validation and other security
  663. considerations.
  664. Hardt, et al. Expires 3 September 2026 [Page 16]
  665. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  666. 1.6. HTTP Redirections
  667. This specification makes extensive use of HTTP redirections, in which
  668. the client or the authorization server directs the resource owner's
  669. user agent to another destination. While the examples in this
  670. specification show the use of the HTTP 302 status code, any other
  671. method available via the user agent to accomplish this redirection,
  672. with the exception of HTTP 307, is allowed and is considered to be an
  673. implementation detail. See Section 7.5.3 for details.
  674. 1.7. Interoperability
  675. OAuth 2.1 provides a rich authorization framework with well-defined
  676. security properties.
  677. This specification leaves a few required components partially or
  678. fully undefined (e.g., client registration, authorization server
  679. capabilities, endpoint discovery). Some of these behaviors are
  680. defined in optional extensions which implementations can choose to
  681. use, such as:
  682. * [RFC8414]: Authorization Server Metadata, defining an endpoint
  683. clients can use to look up the information needed to interact with
  684. a particular OAuth server
  685. * [RFC7591]: Dynamic Client Registration, providing a mechanism for
  686. programmatically registering clients with an authorization server
  687. * [RFC7592]: Dynamic Client Management, providing a mechanism for
  688. updating dynamically registered client information
  689. * [RFC7662]: Token Introspection, defining a mechanism for resource
  690. servers to obtain information about access tokens
  691. Please refer to Appendix D for a list of current known extensions at
  692. the time of this publication.
  693. 1.8. Compatibility with OAuth 2.0
  694. OAuth 2.1 is compatible with OAuth 2.0 with the extensions and
  695. restrictions from known best current practices applied.
  696. Specifically, features not specified in OAuth 2.0 core, such as PKCE,
  697. are required in OAuth 2.1. Additionally, some features available in
  698. OAuth 2.0, such as the Implicit or Resource Owner Credentials grant
  699. types, are not specified in OAuth 2.1. Furthermore, some behaviors
  700. allowed in OAuth 2.0 are restricted in OAuth 2.1, such as the strict
  701. string matching of redirect URIs required by OAuth 2.1.
  702. Hardt, et al. Expires 3 September 2026 [Page 17]
  703. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  704. See Section 10 for more details on the differences from OAuth 2.0.
  705. 1.9. Notational Conventions
  706. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
  707. "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
  708. "OPTIONAL" in this document are to be interpreted as described in
  709. BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all
  710. capitals, as shown here.
  711. This specification uses the Augmented Backus-Naur Form (ABNF)
  712. notation of [RFC5234]. Additionally, the rule URI-reference is
  713. included from "Uniform Resource Identifier (URI): Generic Syntax"
  714. [RFC3986].
  715. Certain security-related terms are to be understood in the sense
  716. defined in [RFC4949]. These terms include, but are not limited to,
  717. "attack", "authentication", "authorization", "certificate",
  718. "confidentiality", "credential", "encryption", "identity", "sign",
  719. "signature", "trust", "validate", and "verify".
  720. The term "content" is to be interpreted as described in Section 6.4
  721. of [RFC9110].
  722. The term "user agent" is to be interpreted as described in
  723. Section 3.5 of [RFC9110].
  724. Unless otherwise noted, all the protocol parameter names and values
  725. are case sensitive.
  726. 2. Client Registration
  727. Before initiating the protocol, the client must have established an
  728. identifier (Section 2.2) at the authorization server. The means
  729. through which the client identifier is established with the
  730. authorization server are beyond the scope of this specification, but
  731. typically involve the client developer manually registering the
  732. client at the authorization server's website (after creating an
  733. account and agreeing to the service's Terms of Service), or by using
  734. Dynamic Client Registration [RFC7591]. Extensions may also define
  735. other programmatic methods of establishing client registration.
  736. Hardt, et al. Expires 3 September 2026 [Page 18]
  737. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  738. Client registration does not require a direct interaction between the
  739. client and the authorization server. When supported by the
  740. authorization server, registration can rely on other means for
  741. establishing trust and obtaining the required client properties
  742. (e.g., redirect URI, client type). For example, registration can be
  743. accomplished using a self-issued or third-party-issued assertion, or
  744. by the authorization server performing client discovery using a
  745. trusted channel.
  746. Client registration MUST include:
  747. * the client type as described in Section 2.1,
  748. * client details needed by the grant type in use, such as redirect
  749. URIs as described in Section 2.3, and
  750. * any other information required by the authorization server (e.g.,
  751. application name, website, description, logo image, the acceptance
  752. of legal terms).
  753. Dynamic Client Registration [RFC7591] defines a common general data
  754. model for clients that may be used even with manual client
  755. registration.
  756. 2.1. Client Types
  757. OAuth 2.1 defines two client types based on their ability to
  758. authenticate securely with the authorization server.
  759. "confidential": Clients that have credentials with the AS are
  760. designated as "confidential clients"
  761. "public": Clients without credentials are called "public clients"
  762. Any clients with credentials MUST take precautions to prevent leakage
  763. and abuse of their credentials.
  764. Client authentication allows an Authorization Server to ensure it is
  765. interacting with a certain client (identified by its client_id) in an
  766. OAuth flow. The Authorization Server might make policy decisions
  767. about things such as whether to prompt the user for consent on every
  768. authorization or only the first based on the confidence that the
  769. Authorization Server is actually communicating with the legitimate
  770. client.
  771. Whether and how an Authorization Server validates the identity of a
  772. client or the party providing/operating this client is out of scope
  773. of this specification. Authorization servers SHOULD consider the
  774. Hardt, et al. Expires 3 September 2026 [Page 19]
  775. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  776. level of confidence in a client's identity when deciding whether they
  777. allow a client access to more sensitive resources and operations such
  778. as the Client Credentials grant type and how often to prompt the user
  779. for consent.
  780. There is no requirement that an Authorization Server supports a
  781. particular client type.
  782. A single client_id SHOULD NOT be treated as more than one type of
  783. client.
  784. This specification has been designed around the following client
  785. profiles:
  786. "web application": A web application is a client running on a web
  787. server. Resource owners access the client via an HTML user
  788. interface rendered in a user agent on the device used by the
  789. resource owner. The client credentials as well as any access
  790. tokens issued to the client are stored on the web server and are
  791. not exposed to or accessible by the resource owner.
  792. "browser-based application": A browser-based application is a client
  793. in which the client code is downloaded from a web server and
  794. executes within a user agent (e.g., web browser) on the device
  795. used by the resource owner. Protocol data and credentials are
  796. easily accessible (and often visible) to the resource owner. If
  797. such applications wish to use client credentials, it is
  798. recommended to utilize the backend for frontend pattern. Since
  799. such applications reside within the user agent, they can make
  800. seamless use of the user agent capabilities when requesting
  801. authorization.
  802. "native application": A native application is a client installed and
  803. executed on the device used by the resource owner. Protocol data
  804. and credentials are accessible to the resource owner. It is
  805. assumed that any client authentication credentials included in the
  806. application can be extracted. Dynamically issued access tokens
  807. and refresh tokens can receive an acceptable level of protection.
  808. On some platforms, these credentials are protected from other
  809. applications residing on the same device. If such applications
  810. wish to use client credentials, it is recommended to utilize the
  811. backend for frontend pattern, or issue the credentials at runtime
  812. using Dynamic Client Registration [RFC7591].
  813. Hardt, et al. Expires 3 September 2026 [Page 20]
  814. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  815. 2.2. Client Identifier
  816. Every client is identified in the context of an authorization server
  817. by a client identifier -- a unique string representing the
  818. registration information provided by the client. While the
  819. Authorization Server typically issues the client identifier itself,
  820. it may also serve clients whose client identifier was created by a
  821. party other than the Authorization Server. The client identifier is
  822. not a secret; it is exposed to the resource owner and MUST NOT be
  823. used alone for client authentication. The client identifier is
  824. unique in the context of an authorization server.
  825. The client identifier is an opaque string whose size is left
  826. undefined by this specification. The client should avoid making
  827. assumptions about the identifier size. The authorization server
  828. SHOULD document the size of any identifier it issues.
  829. If the authorization server supports clients with client identifiers
  830. issued by parties other than the authorization server, the
  831. authorization server SHOULD take precautions to avoid clients
  832. impersonating resource owners as described in Section 7.4.
  833. 2.3. Client Redirection Endpoint
  834. The client redirection endpoint (also referred to as "redirect
  835. endpoint") is the URI of the client that the authorization server
  836. redirects the user agent back to after completing its interaction
  837. with the resource owner.
  838. The authorization server redirects the user agent to one of the
  839. client's redirection endpoints previously established with the
  840. authorization server during the client registration process.
  841. The redirect URI MUST be an absolute URI as defined by Section 4.3 of
  842. [RFC3986]. The redirect URI MAY include an query string component
  843. (Appendix C.1), which MUST be retained when adding additional query
  844. parameters. The redirect URI MUST NOT include a fragment component.
  845. 2.3.1. Registration Requirements
  846. Authorization servers MUST require clients to register their complete
  847. redirect URI (including the path component). Authorization servers
  848. MUST reject authorization requests that specify a redirect URI that
  849. doesn't exactly match one that was registered, with an exception for
  850. loopback redirects, where an exact match is required except for the
  851. port URI component, see Section 4.1.1 for details.
  852. Hardt, et al. Expires 3 September 2026 [Page 21]
  853. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  854. The authorization server MAY allow the client to register multiple
  855. redirect URIs.
  856. Registration may happen out of band, such as a manual step of
  857. configuring the client information at the authorization server, or
  858. may happen at runtime, such as in the initial POST in Pushed
  859. Authorization Requests [RFC9126].
  860. For private-use URI scheme-based redirect URIs, authorization servers
  861. SHOULD enforce the requirement in Section 8.4.3 that clients use
  862. schemes that are reverse domain name based. At a minimum, any
  863. private-use URI scheme that doesn't contain a period character (.)
  864. SHOULD be rejected.
  865. In addition to the collision-resistant properties, this can help to
  866. prove ownership in the event of a dispute where two apps claim the
  867. same private-use URI scheme (where one app is acting maliciously).
  868. For example, if two apps claimed com.example.app, the owner of
  869. example.com could petition the app store operator to remove the
  870. counterfeit app. Such a petition is harder to prove if a generic URI
  871. scheme was used.
  872. Clients MUST NOT expose URLs that forward the user's browser to
  873. arbitrary URIs obtained from a query parameter ("open redirector"),
  874. as described in Section 7.12. Open redirectors can enable
  875. exfiltration of authorization codes and access tokens.
  876. The client MAY use the state request parameter to achieve per-request
  877. customization if needed rather than varying the redirect URI per
  878. request.
  879. Without requiring registration of redirect URIs, attackers can use
  880. the authorization endpoint as an open redirector as described in
  881. Section 7.12.
  882. 2.3.2. Multiple Redirect URIs
  883. If multiple redirect URIs have been registered to a client, the
  884. client MUST include a redirect URI with the authorization request
  885. using the redirect_uri request parameter (Section 4.1.1). If only a
  886. single redirect URI has been registered to a client, the redirect_uri
  887. request parameter is optional.
  888. Hardt, et al. Expires 3 September 2026 [Page 22]
  889. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  890. 2.3.3. Preventing CSRF Attacks
  891. Clients MUST prevent Cross-Site Request Forgery (CSRF) attacks. In
  892. this context, CSRF refers to requests to the redirection endpoint
  893. that do not originate at the authorization server, but a malicious
  894. third party (see Section 4.4.1.8 of [RFC6819] for details). Clients
  895. that have ensured that the authorization server supports the
  896. code_challenge parameter MAY rely on the CSRF protection provided by
  897. that mechanism. In OpenID Connect flows, validating the nonce
  898. parameter provides CSRF protection. Otherwise, one-time use CSRF
  899. tokens carried in the state parameter that are securely bound to the
  900. user agent MUST be used for CSRF protection (see Section 7.9).
  901. 2.3.4. Preventing Mix-Up Attacks
  902. When an OAuth client can only interact with one authorization server,
  903. a mix-up defense is not required. In scenarios where an OAuth client
  904. interacts with two or more authorization servers, however, clients
  905. MUST prevent mix-up attacks. In order to prevent mix-up attacks,
  906. clients MUST only process redirect responses of the issuer they sent
  907. the respective request to and from the same user agent this
  908. authorization request was initiated with.
  909. See Section 7.14 for a detailed description of two different defenses
  910. against mix-up attacks.
  911. 2.3.5. Invalid Endpoint
  912. If an authorization request fails validation due to a missing,
  913. invalid, or mismatching redirect URI, the authorization server SHOULD
  914. inform the resource owner of the error and MUST NOT automatically
  915. redirect the user agent to the invalid redirect URI.
  916. 2.3.6. Endpoint Content
  917. The redirection request to the client's endpoint typically results in
  918. an HTML document response, processed by the user agent. If the HTML
  919. response is served directly as the result of the redirection request,
  920. any script included in the HTML document will execute with full
  921. access to the redirect URI and the artifacts (e.g., authorization
  922. code) it contains. Additionally, the request URL containing the
  923. authorization code may be sent in the HTTP Referer header to any
  924. embedded images, stylesheets and other elements loaded in the page.
  925. The client SHOULD NOT include any third-party scripts (e.g., third-
  926. party analytics, social plug-ins, ad networks) in the redirect URI
  927. endpoint response. Instead, it SHOULD extract the artifacts from the
  928. URI and redirect the user agent again to another endpoint without
  929. Hardt, et al. Expires 3 September 2026 [Page 23]
  930. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  931. exposing the artifacts (in the URI or elsewhere). If third-party
  932. scripts are included, the client MUST ensure that its own scripts
  933. (used to extract and remove the credentials from the URI) will
  934. execute first.
  935. 2.4. Client Authentication
  936. The authorization server MUST only rely on client authentication if
  937. the process of issuance/registration and distribution of the
  938. underlying credentials ensures their confidentiality.
  939. For confidential clients, the authorization server MAY accept any
  940. form of client authentication meeting its security requirements
  941. (e.g., client secret, public/private key pair).
  942. It is RECOMMENDED to use asymmetric (public-key based) methods for
  943. client authentication such as mTLS [RFC8705] or using signed JWTs
  944. ("Private Key JWT") in accordance with [RFC7521], [RFC7523], and
  945. their update [I-D.ietf-oauth-rfc7523bis] (defined in [OpenID.Connect]
  946. as the client authentication method private_key_jwt). When such
  947. methods for client authentication are used, authorization servers do
  948. not need to store sensitive symmetric keys, making these methods more
  949. robust against a number of attacks, and enables clients to manage
  950. their own keys and key rotation.
  951. When using JWT-based client authentication, clients and authorization
  952. servers MUST follow the updated guidance around aud values in
  953. [I-D.ietf-oauth-rfc7523bis].
  954. When client authentication is not possible, the authorization server
  955. SHOULD employ other means to validate the client's identity -- for
  956. example, by requiring the registration of the client redirect URI or
  957. enlisting the resource owner to confirm identity. A valid redirect
  958. URI is not sufficient to verify the client's identity when asking for
  959. resource owner authorization but can be used to prevent delivering
  960. credentials to a counterfeit client after obtaining resource owner
  961. authorization.
  962. The client MUST NOT use more than one authentication method in each
  963. request to prevent a conflict of which authentication mechanism is
  964. authoritative for the request.
  965. The authorization server MUST consider the security implications of
  966. interacting with unauthenticated clients and take measures to limit
  967. the potential exposure of tokens issued to such clients, (e.g.,
  968. limiting the lifetime of refresh tokens).
  969. Hardt, et al. Expires 3 September 2026 [Page 24]
  970. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  971. The privileges an authorization server associates with a certain
  972. client identity MUST depend on the assessment of the overall process
  973. for client identification and client credential lifecycle management.
  974. See Section 7.2 for additional details.
  975. 2.4.1. Client Secret
  976. To support confidential clients in possession of a client secret, the
  977. authorization server MUST support the client including the client
  978. credentials in the request body content using the following
  979. parameters:
  980. "client_id": REQUIRED. The client identifier issued to the client
  981. during the registration process described by Section 2.2.
  982. "client_secret": REQUIRED. The client secret.
  983. The parameters can only be transmitted in the request content and
  984. MUST NOT be included in the request URI.
  985. This is also known as client_secret_post as defined in Section 2 of
  986. [RFC7591].
  987. For example, a request to refresh an access token (Section 4.3) using
  988. the content parameters (with extra line breaks for display purposes
  989. only):
  990. POST /token HTTP/1.1
  991. Host: server.example.com
  992. Content-Type: application/x-www-form-urlencoded
  993. grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
  994. &client_id=s6BhdRkqt3&client_secret=7Fjfp0ZBr1KtDRbnfVdmIw
  995. The authorization server MAY support the HTTP Basic authentication
  996. scheme for authenticating clients that were issued a client secret.
  997. When using the HTTP Basic authentication scheme as defined in
  998. Section 11 of [RFC9110] to authenticate with the authorization
  999. server, the client identifier is encoded using the application/x-www-
  1000. form-urlencoded encoding algorithm per Appendix B, and the encoded
  1001. value is used as the username; the client secret is encoded using the
  1002. same algorithm and used as the password.
  1003. This is also known as client_secret_basic as defined in Section 2 of
  1004. [RFC7591].
  1005. For example (with extra line breaks for display purposes only):
  1006. Hardt, et al. Expires 3 September 2026 [Page 25]
  1007. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1008. Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3
  1009. Note: This method of initially form-encoding the client identifier
  1010. and secret, and then using the encoded values as the HTTP Basic
  1011. authentication username and password, has led to many
  1012. interoperability problems in the past. Some implementations have
  1013. missed the encoding step, or decided to only encode certain
  1014. characters, or ignored the encoding requirement when validating the
  1015. credentials, leading to clients having to special-case how they
  1016. present the credentials to individual authorization servers.
  1017. Including the credentials in the request body content avoids the
  1018. encoding issues and leads to more interoperable implementations.
  1019. Since the client secret authentication method involves a password,
  1020. the authorization server MUST protect any endpoint utilizing it
  1021. against brute force attacks.
  1022. 2.4.2. Other Authentication Methods
  1023. The authorization server MAY support any suitable authentication
  1024. scheme matching its security requirements. When using other
  1025. authentication methods, the authorization server MUST define a
  1026. mapping between the client identifier (registration record) and
  1027. authentication scheme.
  1028. Some additional authentication methods such as mTLS [RFC8705] and
  1029. Private Key JWT ([RFC7523], [I-D.ietf-oauth-rfc7523bis]) are defined
  1030. in the "OAuth Token Endpoint Authentication Methods
  1031. (https://www.iana.org/assignments/oauth-parameters/oauth-
  1032. parameters.xhtml#token-endpoint-auth-method)" registry, and may be
  1033. useful as generic client authentication methods beyond the specific
  1034. use of protecting the token endpoint.
  1035. 2.5. Unregistered Clients
  1036. This specification does not require that clients be registered with
  1037. the authorization server. However, the use of unregistered clients
  1038. is beyond the scope of this specification and requires additional
  1039. security analysis and review of its interoperability impact.
  1040. 3. Protocol Endpoints
  1041. The authorization process utilizes two authorization server endpoints
  1042. (HTTP resources):
  1043. * Authorization endpoint - used by the client to obtain
  1044. authorization from the resource owner via user agent redirection.
  1045. Hardt, et al. Expires 3 September 2026 [Page 26]
  1046. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1047. * Token endpoint - used by the client to exchange an authorization
  1048. grant for an access token, typically with client authentication.
  1049. As well as one client endpoint:
  1050. * Redirection endpoint - used by the authorization server to return
  1051. responses containing authorization credentials to the client via
  1052. the resource owner user agent.
  1053. Not every authorization grant type utilizes both endpoints.
  1054. Extension grant types MAY define additional endpoints as needed.
  1055. 3.1. Authorization Endpoint
  1056. The authorization endpoint is used to interact with the resource
  1057. owner and obtain an authorization grant. The authorization server
  1058. MUST first authenticate the resource owner. The way in which the
  1059. authorization server authenticates the resource owner (e.g., username
  1060. and password login, passkey, federated login, or by using an
  1061. established session) is beyond the scope of this specification.
  1062. The means through which the client obtains the URL of the
  1063. authorization endpoint are beyond the scope of this specification,
  1064. but the URL is typically provided in the service documentation, or in
  1065. the authorization server's metadata document [RFC8414].
  1066. The authorization endpoint URL MUST NOT include a fragment component,
  1067. and MAY include a query string component Appendix C.1, which MUST be
  1068. retained when adding additional query parameters.
  1069. The authorization server MUST support the use of the HTTP GET method
  1070. Section 9.3.1 of [RFC9110] for the authorization endpoint and MAY
  1071. support the POST method (Section 9.3.3 of [RFC9110]) as well.
  1072. The authorization server MUST ignore unrecognized request parameters
  1073. sent to the authorization endpoint.
  1074. Request and response parameters defined by this specification MUST
  1075. NOT be included more than once. This requirement also applies to
  1076. parameters defined by extensions unless the extension explicitly
  1077. defines otherwise for a specific parameter. Parameters sent without
  1078. a value MUST be treated as if they were omitted from the request.
  1079. An authorization server that redirects a request potentially
  1080. containing user credentials MUST avoid forwarding these user
  1081. credentials accidentally (see Section 7.5.3 for details).
  1082. Hardt, et al. Expires 3 September 2026 [Page 27]
  1083. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1084. Cross-Origin Resource Sharing [WHATWG.CORS] MUST NOT be supported at
  1085. the Authorization Endpoint as the client does not access this
  1086. endpoint directly, instead the client redirects the user agent to it.
  1087. 3.2. Token Endpoint
  1088. The token endpoint is used by the client to obtain an access token
  1089. using a grant such as those described in Section 4 and Section 4.3.
  1090. The means through which the client obtains the URL of the token
  1091. endpoint are beyond the scope of this specification, but the URL is
  1092. typically provided in the service documentation and configured during
  1093. development of the client, or provided in the authorization server's
  1094. metadata document [RFC8414] and fetched programmatically at runtime.
  1095. The token endpoint URL MUST NOT include a fragment component, and MAY
  1096. include a query string component Appendix C.1.
  1097. The client MUST use the HTTP POST method when making requests to the
  1098. token endpoint.
  1099. The authorization server MUST ignore unrecognized request parameters
  1100. sent to the token endpoint.
  1101. Parameters sent without a value MUST be treated as if they were
  1102. omitted from the request. Request and response parameters defined by
  1103. this specification MUST NOT be included more than once. This
  1104. requirement also applies to parameters defined by extensions unless
  1105. the extension explicitly defines otherwise for a specific parameter.
  1106. Authorization servers that wish to support browser-based applications
  1107. (for example, applications running exclusively in client-side
  1108. JavaScript without access to a supporting backend server) will need
  1109. to ensure the token endpoint supports the necessary CORS
  1110. [WHATWG.CORS] headers to allow the responses to be visible to the
  1111. application. If the authorization server provides additional
  1112. endpoints to the application, such as metadata URLs, dynamic client
  1113. registration, revocation, introspection, discovery or user info
  1114. endpoints, these endpoints may also be accessed by the browser-based
  1115. application, and will also need to have the CORS headers defined to
  1116. allow access. See [I-D.ietf-oauth-browser-based-apps] for further
  1117. details.
  1118. 3.2.1. Client Authentication
  1119. Confidential clients MUST authenticate with the authorization server
  1120. as described in Section 2.4 when making requests to the token
  1121. endpoint.
  1122. Hardt, et al. Expires 3 September 2026 [Page 28]
  1123. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1124. Client authentication is used for:
  1125. * Enforcing the binding of refresh tokens and authorization codes to
  1126. the client they were issued to. Client authentication adds an
  1127. additional layer of security when an authorization code is
  1128. transmitted to the redirection endpoint over an insecure channel.
  1129. * Recovering from a compromised client by disabling the client or
  1130. changing its credentials, thus preventing an attacker from abusing
  1131. stolen refresh tokens. Changing a single set of client
  1132. credentials is significantly faster than revoking an entire set of
  1133. refresh tokens.
  1134. * Implementing authentication management best practices, which
  1135. require periodic credential rotation. Rotation of an entire set
  1136. of refresh tokens can be challenging, while rotation of a single
  1137. set of client credentials is significantly easier.
  1138. 3.2.2. Token Endpoint Request
  1139. The client makes a request to the token endpoint by sending the
  1140. following parameters using the form-encoded serialization format per
  1141. Appendix C.2 with a character encoding of UTF-8 in the HTTP request
  1142. content:
  1143. "grant_type": REQUIRED. Identifier of the grant type the client
  1144. uses with the particular token request. This specification
  1145. defines the values authorization_code, refresh_token, and
  1146. client_credentials. The grant type determines the further
  1147. parameters required or supported by the token request. The
  1148. details of those grant types are defined below.
  1149. "client_id": OPTIONAL. The client identifier is needed when a form
  1150. of client authentication that relies on the parameter is used, or
  1151. the grant_type requires identification of public clients.
  1152. Confidential clients MUST authenticate with the authorization server
  1153. as described in Section 3.2.1.
  1154. For example, the client makes the following HTTPS request (with extra
  1155. line breaks for display purposes only):
  1156. Hardt, et al. Expires 3 September 2026 [Page 29]
  1157. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1158. POST /token HTTP/1.1
  1159. Host: server.example.com
  1160. Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
  1161. Content-Type: application/x-www-form-urlencoded
  1162. grant_type=authorization_code
  1163. &code=SplxlOBeZQQYbYS6WxSbIA
  1164. &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb
  1165. &code_verifier=3641a2d12d66101249cdf7a79c000c1f8c05d2aafcf14bf146497bed
  1166. The authorization server MUST:
  1167. * require client authentication for confidential clients (or clients
  1168. with other authentication requirements),
  1169. * authenticate the client if client authentication is included
  1170. Further grant type specific processing rules apply and are specified
  1171. with the respective grant type.
  1172. 3.2.3. Token Endpoint Response
  1173. If the access token request is valid and authorized, the
  1174. authorization server issues an access token and optional refresh
  1175. token.
  1176. If the client authentication failed or is invalid, the authorization
  1177. server returns an error response as described in Section 3.2.4.
  1178. The authorization server issues an access token and optional refresh
  1179. token by creating an HTTP response according to Appendix C.3, using
  1180. the application/json media type as defined by [RFC8259], with the
  1181. following parameters and an HTTP 200 (OK) status code:
  1182. "access_token": REQUIRED. The access token issued by the
  1183. authorization server.
  1184. "token_type": REQUIRED. The type of the access token issued as
  1185. described in Section 1.4. Value is case insensitive.
  1186. "expires_in": RECOMMENDED. A JSON number that represents the
  1187. lifetime in seconds of the access token. For example, the value
  1188. 3600 denotes that the access token will expire in one hour from
  1189. the time the response was generated. If omitted, the
  1190. authorization server SHOULD provide the lifetime via other means
  1191. or document the default value. Note that the authorization server
  1192. may prematurely expire an access token and clients MUST NOT expect
  1193. an access token to be valid for the provided lifetime.
  1194. Hardt, et al. Expires 3 September 2026 [Page 30]
  1195. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1196. "scope": RECOMMENDED, if identical to the scope requested by the
  1197. client; otherwise, REQUIRED. The scope of the access token as
  1198. described by Section 1.4.1.
  1199. "refresh_token": OPTIONAL. The refresh token, which can be used to
  1200. obtain new access tokens based on the grant passed in the
  1201. corresponding token request.
  1202. Authorization servers SHOULD determine, based on a risk assessment
  1203. and their own policies, whether to issue refresh tokens to a certain
  1204. client. If the authorization server decides not to issue refresh
  1205. tokens, the client MAY obtain new access tokens by starting the OAuth
  1206. flow over, for example initiating a new authorization code request.
  1207. In such a case, the authorization server may utilize cookies and
  1208. persistent grants to optimize the user experience.
  1209. If refresh tokens are issued, those refresh tokens MUST be bound to
  1210. the scope and resource servers as consented by the resource owner.
  1211. This is to prevent privilege escalation by the legitimate client and
  1212. reduce the impact of refresh token leakage.
  1213. The parameters are serialized into a JavaScript Object Notation
  1214. (JSON) structure as described in Appendix C.3.
  1215. The authorization server MUST include the HTTP Cache-Control response
  1216. header field (see Section 5.2 of [RFC9111]) with a value of no-store
  1217. in any response containing tokens, credentials, or other sensitive
  1218. information.
  1219. For example:
  1220. HTTP/1.1 200 OK
  1221. Content-Type: application/json
  1222. Cache-Control: no-store
  1223. {
  1224. "access_token": "2YotnFZFEjr1zCsicMWpAA",
  1225. "token_type": "Bearer",
  1226. "expires_in": 3600,
  1227. "refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
  1228. "example_parameter": "example_value"
  1229. }
  1230. The client MUST ignore unrecognized value names in the response. The
  1231. sizes of tokens and other values received from the authorization
  1232. server are left undefined. The client should avoid making
  1233. assumptions about value sizes. The authorization server SHOULD
  1234. document the size of any value it issues.
  1235. Hardt, et al. Expires 3 September 2026 [Page 31]
  1236. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1237. 3.2.4. Token Endpoint Error Response
  1238. The authorization server responds with an HTTP 400 (Bad Request)
  1239. status code (unless specified otherwise) and includes the following
  1240. parameters with the response:
  1241. "error": REQUIRED. A single ASCII [USASCII] error code from the
  1242. following:
  1243. "invalid_request": The request is missing a required parameter,
  1244. includes an unsupported parameter value (other than grant
  1245. type), repeats a parameter, includes multiple credentials,
  1246. utilizes more than one mechanism for authenticating the client,
  1247. contains a code_verifier although no code_challenge was sent in
  1248. the authorization request, or is otherwise malformed.
  1249. "invalid_client": Client authentication failed (e.g., unknown
  1250. client, no client authentication included, or unsupported
  1251. authentication method). The authorization server MAY return an
  1252. HTTP 401 (Unauthorized) status code to indicate which HTTP
  1253. authentication schemes are supported. If the client attempted
  1254. to authenticate via the Authorization request header field, the
  1255. authorization server MUST respond with an HTTP 401
  1256. (Unauthorized) status code and include the WWW-Authenticate
  1257. response header field matching the authentication scheme used
  1258. by the client.
  1259. "invalid_grant": The provided authorization grant (e.g.,
  1260. authorization code, resource owner credentials) or refresh
  1261. token is invalid, expired, revoked, does not match the redirect
  1262. URI used in the authorization request, or was issued to another
  1263. client.
  1264. "unauthorized_client": The authenticated client is not authorized
  1265. to use this authorization grant type.
  1266. "unsupported_grant_type": The authorization grant type is not
  1267. supported by the authorization server.
  1268. "invalid_scope": The requested scope is invalid, unknown,
  1269. malformed, or exceeds the scope granted by the resource owner.
  1270. Values for the error parameter MUST NOT include characters outside
  1271. the set %x20-21 / %x23-5B / %x5D-7E.
  1272. "error_description": OPTIONAL. Human-readable ASCII [USASCII] text
  1273. Hardt, et al. Expires 3 September 2026 [Page 32]
  1274. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1275. providing additional information, used to assist the client
  1276. developer in understanding the error that occurred. Values for
  1277. the error_description parameter MUST NOT include characters
  1278. outside the set %x20-21 / %x23-5B / %x5D-7E.
  1279. "error_uri": OPTIONAL. A URI identifying a human-readable web page
  1280. with information about the error, used to provide the client
  1281. developer with additional information about the error. Values for
  1282. the error_uri parameter MUST conform to the URI-reference syntax
  1283. and thus MUST NOT include characters outside the set %x21 /
  1284. %x23-5B / %x5D-7E.
  1285. The parameters are included in the content of the HTTP response using
  1286. the application/json media type as defined in Appendix C.3.
  1287. For example:
  1288. HTTP/1.1 400 Bad Request
  1289. Content-Type: application/json
  1290. Cache-Control: no-store
  1291. {
  1292. "error": "invalid_request"
  1293. }
  1294. 4. Grant Types
  1295. To request an access token, the client obtains authorization from the
  1296. resource owner. This specification defines the following
  1297. authorization grant types:
  1298. * authorization code
  1299. * client credentials, and
  1300. * refresh token
  1301. It also provides an extension mechanism for defining additional grant
  1302. types.
  1303. 4.1. Authorization Code Grant
  1304. The authorization code grant type is used to obtain both access
  1305. tokens and refresh tokens.
  1306. The grant type uses the additional authorization endpoint to let the
  1307. authorization server interact with the resource owner in order to get
  1308. consent for resource access.
  1309. Hardt, et al. Expires 3 September 2026 [Page 33]
  1310. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1311. Since this is a redirect-based flow, the client must be capable of
  1312. initiating the flow with the resource owner's user agent (typically a
  1313. web browser) and capable of being redirected back to from the
  1314. authorization server.
  1315. +----------+
  1316. | Resource |
  1317. | Owner |
  1318. +----------+
  1319. ^
  1320. |
  1321. |
  1322. +-----|----+ Client Identifier +---------------+
  1323. | .---+---------(1)-- & Redirect URI ------->| |
  1324. | | | | | |
  1325. | | '---------(2)-- User authenticates --->| |
  1326. | | User- | | Authorization |
  1327. | | Agent | | Server |
  1328. | | | | |
  1329. | | .--------(3)-- Authorization Code ---<| |
  1330. +-|----|---+ +---------------+
  1331. | | ^ v
  1332. | | | |
  1333. ^ v | |
  1334. +---------+ | |
  1335. | |>---(4)-- Authorization Code ---------' |
  1336. | Client | & Redirect URI |
  1337. | | |
  1338. | |<---(5)----- Access Token -------------------'
  1339. +---------+ (w/ Optional Refresh Token)
  1340. Figure 3: Authorization Code Flow
  1341. The flow illustrated in Figure 3 includes the following steps:
  1342. (1) The client initiates the flow by directing the resource owner's
  1343. user agent to the authorization endpoint. The client includes its
  1344. client identifier, code challenge (derived from a generated code
  1345. verifier), optional requested scope, optional local state, and a
  1346. redirect URI to which the authorization server will send the user
  1347. agent back once access is granted (or denied).
  1348. (2) The authorization server authenticates the resource owner (via
  1349. the user agent) and establishes whether the resource owner grants or
  1350. denies the client's access request.
  1351. Hardt, et al. Expires 3 September 2026 [Page 34]
  1352. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1353. (3) Assuming the resource owner grants access, the authorization
  1354. server redirects the user agent back to the client using the redirect
  1355. URI provided earlier (in the request or during client registration).
  1356. The redirect URI includes an authorization code and any local state
  1357. provided by the client earlier.
  1358. (4) The client requests an access token from the authorization
  1359. server's token endpoint by including the authorization code received
  1360. in the previous step, and including its code verifier. When making
  1361. the request, the client authenticates with the authorization server
  1362. if it can. The client includes the redirect URI used to obtain the
  1363. authorization code for verification.
  1364. (5) The authorization server authenticates the client when possible,
  1365. validates the authorization code, validates the code verifier, and
  1366. ensures that the redirect URI received matches the URI used to
  1367. redirect the user agent to the client in step (3). If valid, the
  1368. authorization server responds back with an access token and,
  1369. optionally, a refresh token.
  1370. 4.1.1. Authorization Request
  1371. To begin the authorization request, the client builds the
  1372. authorization request URI by adding parameters to the authorization
  1373. server's authorization endpoint URI. The client will eventually
  1374. redirect the user agent to this URI to initiate the request.
  1375. Clients use a unique secret, called the "code verifier", per
  1376. authorization request to protect against authorization code injection
  1377. and CSRF attacks. The client first generates the code verifier, then
  1378. derives the "code challenge" to include in the authorization request.
  1379. The client uses the code verifier when exchanging the authorization
  1380. code at the token endpoint to prove that the client using the
  1381. authorization code is the same client that requested it.
  1382. The client constructs the request URI by adding the following
  1383. parameters to the query component of the authorization endpoint URI
  1384. as described by Appendix C.1:
  1385. "response_type": REQUIRED. The authorization endpoint supports
  1386. different sets of request and response parameters. The client
  1387. determines the type of flow by using a certain response_type
  1388. value. This specification defines the value code, which must be
  1389. used to signal that the client wants to use the authorization code
  1390. flow.
  1391. Hardt, et al. Expires 3 September 2026 [Page 35]
  1392. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1393. Extension response types MAY contain a space-delimited (%x20) list of
  1394. values, where the order of values does not matter (e.g., response
  1395. type a b is the same as b a). The meaning of such composite response
  1396. types is defined by their respective specifications.
  1397. Some extension response types are defined by [OpenID.Connect].
  1398. If an authorization request is missing the response_type parameter,
  1399. or if the response type is not understood, the authorization server
  1400. MUST return an error response as described in Section 4.1.2.1.
  1401. "client_id": REQUIRED. The client identifier as described in
  1402. Section 2.2.
  1403. "code_challenge": REQUIRED unless the specific requirements of
  1404. Section 7.5.1 are met. Code challenge derived from the code
  1405. verifier.
  1406. "code_challenge_method": OPTIONAL, defaults to plain if not present
  1407. in the request. Code verifier transformation method is S256 or
  1408. plain.
  1409. "redirect_uri": OPTIONAL if only one redirect URI is registered for
  1410. this client. REQUIRED if multiple redirect URIs are registered
  1411. for this client. See Section 2.3.2.
  1412. "scope": OPTIONAL. The scope of the access request as described by
  1413. Section 1.4.1.
  1414. "state": OPTIONAL. An opaque value used by the client to maintain
  1415. state between the request and callback. The authorization server
  1416. includes this value when redirecting the user agent back to the
  1417. client.
  1418. The code_verifier is a unique high-entropy cryptographically random
  1419. string generated for each authorization request, using the unreserved
  1420. characters [A-Z] / [a-z] / [0-9] / "-" / "." / "_" / "~", with a
  1421. minimum length of 43 characters and a maximum length of 128
  1422. characters.
  1423. The client stores the code_verifier temporarily, and calculates the
  1424. code_challenge which it uses in the authorization request.
  1425. ABNF for code_verifier is as follows.
  1426. Hardt, et al. Expires 3 September 2026 [Page 36]
  1427. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1428. code-verifier = 43*128unreserved
  1429. unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
  1430. ALPHA = %x41-5A / %x61-7A
  1431. DIGIT = %x30-39
  1432. Clients SHOULD use code challenge methods that do not expose the
  1433. code_verifier in the authorization request. Otherwise, attackers
  1434. that can read the authorization request (cf. Attacker A4 in
  1435. [RFC9700]) can break the security provided by this mechanism.
  1436. Currently, S256 is the only such method.
  1437. NOTE: The code verifier SHOULD have enough entropy to make it
  1438. impractical to guess the value. It is RECOMMENDED that the output of
  1439. a suitable random number generator be used to create a 32-octet
  1440. sequence. The octet sequence is then base64url-encoded to produce a
  1441. 43-octet URL-safe string to use as the code verifier.
  1442. The client then creates a code_challenge derived from the code
  1443. verifier by using one of the following transformations on the code
  1444. verifier:
  1445. S256
  1446. code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier)))
  1447. plain
  1448. code_challenge = code_verifier
  1449. If the client is capable of using S256, it MUST use S256, as S256 is
  1450. Mandatory To Implement (MTI) on the server. Clients are permitted to
  1451. use plain only if they cannot support S256 for some technical reason,
  1452. for example constrained environments that do not have a hashing
  1453. function available, and know via out-of-band configuration or via
  1454. Authorization Server Metadata [RFC8414] that the server supports
  1455. plain.
  1456. ABNF for code_challenge is as follows.
  1457. code-challenge = 43*128unreserved
  1458. unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
  1459. ALPHA = %x41-5A / %x61-7A
  1460. DIGIT = %x30-39
  1461. The properties code_challenge and code_verifier are adopted from the
  1462. OAuth 2.0 extension known as "Proof-Key for Code Exchange", or PKCE
  1463. [RFC7636] where this technique was originally developed.
  1464. Authorization servers MUST support the code_challenge and
  1465. code_verifier parameters.
  1466. Hardt, et al. Expires 3 September 2026 [Page 37]
  1467. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1468. Clients MUST use code_challenge and code_verifier and authorization
  1469. servers MUST enforce their use except under the conditions described
  1470. in Section 7.5.1. Even in this case, using and enforcing
  1471. code_challenge and code_verifier as described above is still
  1472. RECOMMENDED.
  1473. The state and scope parameters SHOULD NOT include sensitive client or
  1474. resource owner information in plain text, as they can be transmitted
  1475. over insecure channels or stored insecurely.
  1476. The client directs the resource owner to the constructed URI using an
  1477. HTTP redirection, or by other means available to it via the user
  1478. agent.
  1479. For example, the client directs the user agent to make the following
  1480. HTTPS request (with extra line breaks for display purposes only):
  1481. GET /authorize?response_type=code&client_id=s6BhdRkqt3&state=xyz
  1482. &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb
  1483. &code_challenge=6fdkQaPm51l13DSukcAH3Mdx7_ntecHYd1vi3n0hMZY
  1484. &code_challenge_method=S256 HTTP/1.1
  1485. Host: server.example.com
  1486. The authorization server validates the request to ensure that all
  1487. required parameters are present and valid.
  1488. In particular, the authorization server MUST validate the
  1489. redirect_uri in the request if present, ensuring that it matches one
  1490. of the registered redirect URIs previously established during client
  1491. registration (Section 2). When comparing the two URIs the
  1492. authorization server MUST ensure that the two URIs are equal, see
  1493. Section 6.2.1 of [RFC3986], Simple String Comparison, for details.
  1494. The only exception is native apps using a localhost URI: In this
  1495. case, the authorization server MUST allow variable port numbers as
  1496. described in Section 7.3 of [RFC8252].
  1497. If the request is valid, the authorization server authenticates the
  1498. resource owner and obtains an authorization decision (by asking the
  1499. resource owner or by establishing approval via other means).
  1500. When a decision is established, the authorization server directs the
  1501. user agent to the provided client redirect URI using an HTTP
  1502. redirection response, or by other means available to it via the user
  1503. agent.
  1504. Hardt, et al. Expires 3 September 2026 [Page 38]
  1505. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1506. 4.1.2. Authorization Response
  1507. If the resource owner grants the access request, the authorization
  1508. server issues an authorization code and delivers it to the client by
  1509. adding the following parameters to the query component of the
  1510. redirect URI using the query string serialization described by
  1511. Appendix C.1, unless specified otherwise by an extension:
  1512. "code": REQUIRED. The authorization code is generated by the
  1513. authorization server and opaque to the client. The authorization
  1514. code MUST expire shortly after it is issued to mitigate the risk
  1515. of leaks. A maximum authorization code lifetime of 10 minutes is
  1516. RECOMMENDED. The authorization code is bound to the client
  1517. identifier, code challenge and redirect URI.
  1518. "state": REQUIRED if the state parameter was present in the client
  1519. authorization request. The exact value received from the client.
  1520. "iss": OPTIONAL. The identifier of the authorization server which
  1521. the client can use to prevent mix-up attacks, if the client
  1522. interacts with more than one authorization server. See
  1523. Section 7.14 and [RFC9207] for additional details on when this
  1524. parameter is necessary, and how the client can use it to prevent
  1525. mix-up attacks.
  1526. For example, the authorization server redirects the user agent by
  1527. sending the following HTTP response:
  1528. HTTP/1.1 302 Found
  1529. Location: https://client.example.com/cb?code=SplxlOBeZQQYbYS6WxSbIA
  1530. &state=xyz&iss=https%3A%2F%2Fauthorization-server.example.com
  1531. The client MUST ignore unrecognized response parameters. The
  1532. authorization code string size is left undefined by this
  1533. specification. The client should avoid making assumptions about code
  1534. value sizes. The authorization server SHOULD document the size of
  1535. any value it issues.
  1536. The authorization server MUST associate the code_challenge and
  1537. code_challenge_method values with the issued authorization code so
  1538. the code challenge can be verified later.
  1539. Hardt, et al. Expires 3 September 2026 [Page 39]
  1540. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1541. The exact method that the server uses to associate the code_challenge
  1542. with the issued code is out of scope for this specification. The
  1543. code challenge could be stored on the server and associated with the
  1544. code there. The code_challenge and code_challenge_method values may
  1545. be stored in encrypted form in the code itself, but the server MUST
  1546. NOT include the code_challenge value in a response parameter in a
  1547. form that entities other than the AS can extract.
  1548. Clients MUST prevent injection (replay) of authorization codes into
  1549. the authorization response by attackers. Using code_challenge and
  1550. code_verifier prevents injection of authorization codes since the
  1551. authorization server will reject a token request with a mismatched
  1552. code_verifier. See Section 7.5.1 for more details.
  1553. 4.1.2.1. Authorization Error Response
  1554. If the request fails due to a missing, invalid, or mismatching
  1555. redirect URI, or if the client identifier is missing or invalid, the
  1556. authorization server MUST NOT redirect the user agent to the invalid
  1557. redirect URI and SHOULD inform the resource owner of the error, for
  1558. example by displaying a message to the user in their browser.
  1559. An authorization server MUST reject requests without a code_challenge
  1560. from public clients, and MUST reject such requests from other clients
  1561. unless there is reasonable assurance that the client mitigates
  1562. authorization code injection in other ways. See Section 7.5.1 for
  1563. details.
  1564. If the server does not support the requested code_challenge_method
  1565. transformation, the authorization endpoint MUST return the
  1566. authorization error response with error value set to invalid_request.
  1567. The error_description or the response of error_uri SHOULD explain the
  1568. nature of error, e.g., transform algorithm not supported.
  1569. If the resource owner denies the access request or if the request
  1570. fails for reasons other than a missing or invalid redirect URI, the
  1571. authorization server informs the client by redirecting the user agent
  1572. to the redirect URI and adding the following parameters to the query
  1573. component of the redirect URI as described by Appendix C.1:
  1574. "error": REQUIRED. A single ASCII [USASCII] error code from the
  1575. following:
  1576. "invalid_request": The request is missing a required parameter,
  1577. includes an invalid parameter value, includes a parameter more
  1578. than once, or is otherwise malformed.
  1579. "unauthorized_client": The client is not authorized to request an
  1580. Hardt, et al. Expires 3 September 2026 [Page 40]
  1581. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1582. authorization code using this method.
  1583. "access_denied": The resource owner or authorization server
  1584. denied the request.
  1585. "unsupported_response_type": The authorization server does not
  1586. support obtaining an authorization code using this method.
  1587. "invalid_scope": The requested scope is invalid, unknown, or
  1588. malformed.
  1589. "server_error": The authorization server encountered an
  1590. unexpected condition that prevented it from fulfilling the
  1591. request. (This error code is needed because a 500 Internal
  1592. Server Error HTTP status code cannot be returned to the client
  1593. via an HTTP redirect.)
  1594. "temporarily_unavailable": The authorization server is currently
  1595. unable to handle the request due to a temporary overloading or
  1596. maintenance of the server. (This error code is needed because
  1597. a 503 Service Unavailable HTTP status code cannot be returned
  1598. to the client via an HTTP redirect.)
  1599. Values for the error parameter MUST NOT include characters outside
  1600. the set %x20-21 / %x23-5B / %x5D-7E.
  1601. "error_description": OPTIONAL. Human-readable ASCII [USASCII] text
  1602. providing additional information, used to assist the client
  1603. developer in understanding the error that occurred. Values for
  1604. the error_description parameter MUST NOT include characters
  1605. outside the set %x20-21 / %x23-5B / %x5D-7E.
  1606. "error_uri": OPTIONAL. A URI identifying a human-readable web page
  1607. with information about the error, used to provide the client
  1608. developer with additional information about the error. Values for
  1609. the error_uri parameter MUST conform to the URI-reference syntax
  1610. and thus MUST NOT include characters outside the set %x21 /
  1611. %x23-5B / %x5D-7E.
  1612. "state": REQUIRED if a state parameter was present in the client
  1613. authorization request. The exact value received from the client.
  1614. "iss": OPTIONAL. The identifier of the authorization server. See
  1615. Section 4.1.2 above for details.
  1616. For example, the authorization server indicates the request was
  1617. denied by redirecting the user agent with the following HTTP
  1618. response:
  1619. Hardt, et al. Expires 3 September 2026 [Page 41]
  1620. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1621. HTTP/1.1 302 Found
  1622. Location: https://client.example.com/cb?error=access_denied
  1623. &state=xyz&iss=https%3A%2F%2Fauthorization-server.example.com
  1624. 4.1.3. Token Endpoint Extension
  1625. The authorization grant type is identified at the token endpoint with
  1626. the grant_type value of authorization_code.
  1627. If this value is set, the following additional token request
  1628. parameters beyond Section 3.2.2 are supported:
  1629. "code": REQUIRED. The authorization code received from the
  1630. authorization server.
  1631. "code_verifier": REQUIRED, if the code_challenge parameter was
  1632. included in the authorization request. MUST NOT be used
  1633. otherwise. The original code verifier string.
  1634. "client_id": REQUIRED, if the client is not authenticating with the
  1635. authorization server as described in Section 3.2.1.
  1636. The authorization server MUST return an access token only once for a
  1637. given authorization code.
  1638. If a second valid token request is made with the same authorization
  1639. code as a previously successful token request, the authorization
  1640. server MUST deny the request and SHOULD revoke (when possible) all
  1641. access tokens and refresh tokens previously issued based on that
  1642. authorization code. See Section 7.5.2 for further details.
  1643. For example, the client makes the following HTTPS request (with extra
  1644. line breaks for display purposes only):
  1645. POST /token HTTP/1.1
  1646. Host: server.example.com
  1647. Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
  1648. Content-Type: application/x-www-form-urlencoded
  1649. grant_type=authorization_code
  1650. &code=SplxlOBeZQQYbYS6WxSbIA
  1651. &code_verifier=3641a2d12d66101249cdf7a79c000c1f8c05d2aafcf14bf146497bed
  1652. In addition to the processing rules in Section 3.2.2, the
  1653. authorization server MUST:
  1654. Hardt, et al. Expires 3 September 2026 [Page 42]
  1655. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1656. * ensure that the authorization code was issued to the authenticated
  1657. confidential client, or if the client is public, ensure that the
  1658. code was issued to client_id in the request,
  1659. * verify that the authorization code is valid,
  1660. * verify that the code_verifier parameter is present if and only if
  1661. a code_challenge parameter was present in the authorization
  1662. request,
  1663. * if a code_verifier is present, verify the code_verifier by
  1664. calculating the code challenge from the received code_verifier and
  1665. comparing it with the previously associated code_challenge, after
  1666. first transforming it according to the code_challenge_method
  1667. method specified by the client, and
  1668. * If there was no code_challenge in the authorization request
  1669. associated with the authorization code in the token request, the
  1670. authorization server MUST reject the token request.
  1671. See Section 10.2 for details on backwards compatibility with OAuth
  1672. 2.0 clients regarding the redirect_uri parameter in the token
  1673. request.
  1674. 4.2. Client Credentials Grant
  1675. The client can request an access token using only its client
  1676. credentials (or other supported means of authentication) when the
  1677. client is requesting access to the protected resources under its
  1678. control, or those of another resource owner that have been previously
  1679. arranged with the authorization server (the method of which is beyond
  1680. the scope of this specification).
  1681. The client credentials grant type MUST only be used by confidential
  1682. clients.
  1683. +---------+ +---------------+
  1684. | | | |
  1685. | |>--(1)- Client Authentication --->| Authorization |
  1686. | Client | | Server |
  1687. | |<--(2)---- Access Token ---------<| |
  1688. | | | |
  1689. +---------+ +---------------+
  1690. Figure 4: Client Credentials Grant
  1691. The use of the client credentials grant illustrated in Figure 4
  1692. includes the following steps:
  1693. Hardt, et al. Expires 3 September 2026 [Page 43]
  1694. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1695. (1) The client authenticates with the authorization server and
  1696. requests an access token from the token endpoint.
  1697. (2) The authorization server authenticates the client, and if valid,
  1698. issues an access token.
  1699. 4.2.1. Token Endpoint Extension
  1700. The client credentials grant type is identified at the token endpoint
  1701. with the grant_type value of client_credentials.
  1702. If this value is set, the following additional token request
  1703. parameters beyond Section 3.2.2 are supported:
  1704. "scope": OPTIONAL. The scope of the access request as described by
  1705. Section 1.4.1.
  1706. For example, the client makes the following HTTP request using
  1707. transport-layer security (with extra line breaks for display purposes
  1708. only):
  1709. POST /token HTTP/1.1
  1710. Host: server.example.com
  1711. Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
  1712. Content-Type: application/x-www-form-urlencoded
  1713. grant_type=client_credentials
  1714. The authorization server MUST authenticate the client.
  1715. 4.3. Refresh Token Grant
  1716. The refresh token is a credential issued by the authorization server
  1717. to a client, which can be used to obtain new (fresh) access tokens
  1718. based on an existing grant. The client uses this option either
  1719. because the previous access token has expired or the client
  1720. previously obtained an access token with a scope more narrow than
  1721. approved by the respective grant and later requires an access token
  1722. with a different scope under the same grant.
  1723. Refresh tokens MUST be kept confidential in transit and storage, and
  1724. shared only among the authorization server and the client to whom the
  1725. refresh tokens were issued. The authorization server MUST maintain
  1726. the binding between a refresh token and the client to whom it was
  1727. issued.
  1728. Hardt, et al. Expires 3 September 2026 [Page 44]
  1729. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1730. The authorization server MUST verify the binding between the refresh
  1731. token and client identity whenever the client identity can be
  1732. authenticated. When client authentication is not possible, the
  1733. authorization server SHOULD issue sender-constrained refresh tokens
  1734. or use refresh token rotation as described in Section 4.3.1.
  1735. The authorization server MUST ensure that refresh tokens cannot be
  1736. generated, modified, or guessed to produce valid refresh tokens by
  1737. unauthorized parties.
  1738. 4.3.1. Token Endpoint Extension
  1739. The refresh token grant type is identified at the token endpoint with
  1740. the grant_type value of refresh_token.
  1741. If this value is set, the following additional parameters beyond
  1742. Section 3.2.2 are supported:
  1743. "refresh_token": REQUIRED. The refresh token issued to the client.
  1744. "scope": OPTIONAL. The scope of the access request as described by
  1745. Section 1.4.1. The requested scope MUST NOT include any scope not
  1746. originally granted by the resource owner, and if omitted is
  1747. treated as equal to the scope originally granted by the resource
  1748. owner.
  1749. Because refresh tokens are typically long-lasting credentials used to
  1750. request additional access tokens, the refresh token is bound to the
  1751. client to which it was issued. Confidential clients MUST
  1752. authenticate with the authorization server as described in
  1753. Section 3.2.1.
  1754. For example, the client makes the following HTTP request using
  1755. transport-layer security (with extra line breaks for display purposes
  1756. only):
  1757. POST /token HTTP/1.1
  1758. Host: server.example.com
  1759. Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
  1760. Content-Type: application/x-www-form-urlencoded
  1761. grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA
  1762. In addition to the processing rules in Section 3.2.2, the
  1763. authorization server MUST:
  1764. Hardt, et al. Expires 3 September 2026 [Page 45]
  1765. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1766. * if client authentication is included in the request, ensure that
  1767. the refresh token was issued to the authenticated client, OR if a
  1768. client_id is included in the request, ensure the refresh token was
  1769. issued to the matching client
  1770. * validate that the grant corresponding to this refresh token is
  1771. still active
  1772. * validate the refresh token
  1773. Authorization servers MUST utilize one of these methods to detect
  1774. refresh token replay by malicious actors for public clients:
  1775. * _Sender-constrained refresh tokens:_ the authorization server
  1776. cryptographically binds the refresh token to a certain client
  1777. instance, e.g., by utilizing DPoP [RFC9449] or mTLS [RFC8705].
  1778. * _Refresh token rotation:_ the authorization server issues a new
  1779. refresh token with every access token refresh response. The
  1780. previous refresh token is invalidated but information about the
  1781. relationship is retained by the authorization server. If a
  1782. refresh token is compromised and subsequently used by both the
  1783. attacker and the legitimate client, one of them will present an
  1784. invalidated refresh token, which will inform the authorization
  1785. server of the breach. The authorization server cannot determine
  1786. which party submitted the invalid refresh token, but it will
  1787. revoke the active refresh token as well as the access
  1788. authorization grant associated with it. This stops the attack at
  1789. the cost of forcing the legitimate client to obtain a fresh
  1790. authorization grant.
  1791. Implementation note: the grant to which a refresh token belongs may
  1792. be encoded into the refresh token itself. This can enable an
  1793. authorization server to efficiently determine the grant to which a
  1794. refresh token belongs, and by extension, all refresh tokens that need
  1795. to be revoked. Authorization servers MUST ensure the integrity of
  1796. the refresh token value in this case, for example, using signatures.
  1797. 4.3.2. Refresh Token Response
  1798. If valid and authorized, the authorization server issues an access
  1799. token as described in Section 3.2.3.
  1800. The authorization server MAY issue a new refresh token, in which case
  1801. the client MUST discard the old refresh token and replace it with the
  1802. new refresh token.
  1803. Hardt, et al. Expires 3 September 2026 [Page 46]
  1804. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1805. 4.3.3. Refresh Token Recommendations
  1806. The authorization server MAY revoke the old refresh token after
  1807. issuing a new refresh token to the client. If a new refresh token is
  1808. issued, the refresh token scope MUST be identical to that of the
  1809. refresh token included by the client in the request.
  1810. Authorization servers MAY revoke refresh tokens automatically in case
  1811. of a security event, such as:
  1812. * password change
  1813. * logout at the authorization server
  1814. Refresh tokens SHOULD expire if the client has been inactive for some
  1815. time, i.e., the refresh token has not been used to obtain new access
  1816. tokens for some time. The expiration time is at the discretion of
  1817. the authorization server. It might be a global value or determined
  1818. based on the client policy or the grant associated with the refresh
  1819. token (and its sensitivity).
  1820. 4.4. Extension Grants
  1821. The client uses an extension grant type by specifying the grant type
  1822. using an absolute URI (defined by the authorization server) as the
  1823. value of the grant_type parameter of the token endpoint, and by
  1824. adding any additional parameters necessary.
  1825. For example, to request an access token using the Device
  1826. Authorization Grant as defined by [RFC8628] after the user has
  1827. authorized the client on a separate device, the client makes the
  1828. following HTTPS request (with extra line breaks for display purposes
  1829. only):
  1830. POST /token HTTP/1.1
  1831. Host: server.example.com
  1832. Content-Type: application/x-www-form-urlencoded
  1833. grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Adevice_code
  1834. &device_code=GmRhmhcxhwEzkoEqiMEg_DnyEysNkuNhszIySk9eS
  1835. &client_id=C409020731
  1836. If the access token request is valid and authorized, the
  1837. authorization server issues an access token and optional refresh
  1838. token as described in Section 3.2.3. If the request failed client
  1839. authentication or is invalid, the authorization server returns an
  1840. error response as described in Section 3.2.4.
  1841. Hardt, et al. Expires 3 September 2026 [Page 47]
  1842. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1843. 5. Resource Requests
  1844. The client accesses protected resources by presenting an access token
  1845. to the resource server. The resource server MUST validate the access
  1846. token and ensure that it has not expired and that its scope covers
  1847. the requested resource. The methods used by the resource server to
  1848. validate the access token are beyond the scope of this specification,
  1849. but generally involve an interaction or coordination between the
  1850. resource server and the authorization server. For example, when the
  1851. resource server and authorization server are colocated or are part of
  1852. the same system, they may share a database or other storage; when the
  1853. two components are operated independently, they may use Token
  1854. Introspection [RFC7662] or a structured access token format such as a
  1855. JWT [RFC9068].
  1856. 5.1. Bearer Token Requests
  1857. This section defines two methods of sending Bearer tokens in resource
  1858. requests to resource servers. Clients MUST use one of the two
  1859. methods defined below, and MUST NOT use more than one method to
  1860. transmit the token in each request.
  1861. In particular, clients MUST NOT send the access token in a URI query
  1862. parameter, and resource servers MUST ignore access tokens in a URI
  1863. query parameter.
  1864. 5.1.1. Authorization Request Header Field
  1865. When sending the access token in the Authorization request header
  1866. field defined by HTTP/1.1 [RFC7235], the client uses the Bearer
  1867. scheme to transmit the access token.
  1868. For example:
  1869. GET /resource HTTP/1.1
  1870. Host: server.example.com
  1871. Authorization: Bearer mF_9.B5f-4.1JqM
  1872. The syntax of the Authorization header field for this scheme follows
  1873. the usage of the Basic scheme defined in Section 2 of [RFC2617].
  1874. Note that, as with Basic, it does not conform to the generic syntax
  1875. defined in Section 1.2 of [RFC2617] but is compatible with the
  1876. general authentication framework in HTTP 1.1 Authentication
  1877. [RFC7235], although it does not follow the preferred practice
  1878. outlined therein in order to reflect existing deployments. The
  1879. syntax for Bearer credentials is as follows:
  1880. Hardt, et al. Expires 3 September 2026 [Page 48]
  1881. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1882. token68 = 1*( ALPHA / DIGIT /
  1883. "-" / "." / "_" / "~" / "+" / "/" ) *"="
  1884. credentials = "bearer" 1*SP token68
  1885. Clients SHOULD make authenticated requests with a bearer token using
  1886. the Authorization request header field with the Bearer HTTP
  1887. authorization scheme. Resource servers MUST support this method.
  1888. As described in Section 11.1 of [RFC9110], the string bearer is case-
  1889. insensitive. This means all of the following are valid uses of the
  1890. Authorization header:
  1891. * Authorization: Bearer mF_9.B5f-4.1JqM
  1892. * Authorization: bearer mF_9.B5f-4.1JqM
  1893. * Authorization: BEARER mF_9.B5f-4.1JqM
  1894. * Authorization: bEaReR mF_9.B5f-4.1JqM
  1895. 5.1.2. Form-Encoded Content Parameter
  1896. When sending the access token in the HTTP request content, the client
  1897. adds the access token to the request content using the access_token
  1898. parameter. The client MUST NOT use this method unless all of the
  1899. following conditions are met:
  1900. * The HTTP request includes the Content-Type header field set to
  1901. application/x-www-form-urlencoded.
  1902. * The content follows the encoding requirements of the application/
  1903. x-www-form-urlencoded content-type as defined by the URL Living
  1904. Standard [WHATWG.URL].
  1905. * The HTTP request content is single-part.
  1906. * The content to be encoded in the request MUST consist entirely of
  1907. ASCII [USASCII] characters.
  1908. * The HTTP request method is one for which the content has defined
  1909. semantics. In particular, this means that the GET method MUST NOT
  1910. be used.
  1911. The content MAY include other request-specific parameters, in which
  1912. case the access_token parameter MUST be properly separated from the
  1913. request-specific parameters using & character(s) (ASCII code 38).
  1914. Hardt, et al. Expires 3 September 2026 [Page 49]
  1915. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1916. For example, the client makes the following HTTP request using
  1917. transport-layer security:
  1918. POST /resource HTTP/1.1
  1919. Host: server.example.com
  1920. Content-Type: application/x-www-form-urlencoded
  1921. access_token=mF_9.B5f-4.1JqM
  1922. The application/x-www-form-urlencoded method SHOULD NOT be used
  1923. except in application contexts where participating clients do not
  1924. have access to the Authorization request header field. Resource
  1925. servers MAY support this method.
  1926. 5.2. Access Token Validation
  1927. After receiving the access token, the resource server MUST check that
  1928. the access token is not yet expired, is authorized to access the
  1929. requested resource, was issued with the appropriate scope, and meets
  1930. other policy requirements of the resource server to access the
  1931. protected resource.
  1932. Access tokens generally fall into two categories: reference tokens or
  1933. self-encoded tokens. Reference tokens can be validated by querying
  1934. the authorization server or looking up the token in a token database,
  1935. whereas self-encoded tokens contain the authorization information in
  1936. an encrypted and/or signed string which can be extracted by the
  1937. resource server.
  1938. A standardized method to query the authorization server to check the
  1939. validity of an access token is defined in Token Introspection
  1940. [RFC7662].
  1941. A standardized method of encoding information in a token string is
  1942. defined in JWT Profile for Access Tokens [RFC9068].
  1943. See Section 7.1 for additional considerations around creating and
  1944. validating access tokens.
  1945. 5.3. Error Response
  1946. If a resource access request fails, the resource server SHOULD inform
  1947. the client of the error. The details of the error response is
  1948. determined by the particular token type, such as the description of
  1949. Bearer tokens in Section 5.3.2.
  1950. Hardt, et al. Expires 3 September 2026 [Page 50]
  1951. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1952. 5.3.1. The WWW-Authenticate Response Header Field
  1953. If the protected resource request does not include authentication
  1954. credentials or does not contain an access token that enables access
  1955. to the protected resource, the resource server MUST include the HTTP
  1956. WWW-Authenticate response header field; it MAY include it in response
  1957. to other conditions as well. The WWW-Authenticate header field uses
  1958. the framework defined by HTTP/1.1 [RFC7235].
  1959. All challenges for this token type MUST use the auth-scheme value
  1960. Bearer. This scheme MUST be followed by one or more auth-param
  1961. values. The auth-param attributes used or defined by this
  1962. specification for this token type are as follows. Other auth-param
  1963. attributes MAY be used as well.
  1964. "realm": A realm attribute MAY be included to indicate the scope of
  1965. protection in the manner described in HTTP/1.1 [RFC7235]. The
  1966. realm attribute MUST NOT appear more than once.
  1967. "scope": The scope attribute is defined in Section 1.4.1. The scope
  1968. attribute is a space-delimited list of case-sensitive scope values
  1969. indicating the required scope of the access token for accessing
  1970. the requested resource. scope values are implementation defined;
  1971. there is no centralized registry for them; allowed values are
  1972. defined by the authorization server. The order of scope values is
  1973. not significant. In some cases, the scope value will be used when
  1974. requesting a new access token with sufficient scope of access to
  1975. utilize the protected resource. Use of the scope attribute is
  1976. OPTIONAL. The scope attribute MUST NOT appear more than once.
  1977. The scope value is intended for programmatic use and is not meant
  1978. to be displayed to end users.
  1979. Two example scope values follow; these are taken from the OpenID
  1980. Connect [OpenID.Messages] and the Open Authentication Technology
  1981. Committee (OATC) Online Multimedia Authorization Protocol [OMAP]
  1982. OAuth 2.0 use cases, respectively:
  1983. scope="openid profile email"
  1984. scope="urn:example:channel=HBO&urn:example:rating=G,PG-13"
  1985. "error": If the protected resource request included an access token
  1986. and failed authentication, the resource server SHOULD include the
  1987. error attribute to provide the client with the reason why the
  1988. access request was declined. The parameter value is described in
  1989. Section 5.3.2.
  1990. "error_description": The resource server MAY include the
  1991. Hardt, et al. Expires 3 September 2026 [Page 51]
  1992. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  1993. error_description attribute to provide developers a human-readable
  1994. explanation that is not meant to be displayed to end users.
  1995. "error_uri": The resource server MAY include the error_uri attribute
  1996. with an absolute URI identifying a human-readable web page
  1997. explaining the error.
  1998. The error, error_description, and error_uri attributes MUST NOT
  1999. appear more than once.
  2000. Values for the scope attribute (specified in Appendix A.4) MUST NOT
  2001. include characters outside the set %x21 / %x23-5B / %x5D-7E for
  2002. representing scope values and %x20 for delimiters between scope
  2003. values. Values for the error and error_description attributes
  2004. (specified in Appendix A.7 and Appendix A.8) MUST NOT include
  2005. characters outside the set %x20-21 / %x23-5B / %x5D-7E. Values for
  2006. the error_uri attribute (specified in Appendix A.9 of) MUST conform
  2007. to the URI-reference syntax and thus MUST NOT include characters
  2008. outside the set %x21 / %x23-5B / %x5D-7E.
  2009. 5.3.2. Error Codes
  2010. When a request fails, the resource server responds using the
  2011. appropriate HTTP status code (typically, 400, 401, 403, or 405) and
  2012. includes one of the following error codes in the response:
  2013. "invalid_request": The request is missing a required parameter,
  2014. includes an unsupported parameter or parameter value, repeats the
  2015. same parameter, uses more than one method for including an access
  2016. token, or is otherwise malformed. The resource server SHOULD
  2017. respond with the HTTP 400 (Bad Request) status code.
  2018. "invalid_token": The access token provided is expired, revoked,
  2019. malformed, or invalid for other reasons. The resource server
  2020. SHOULD respond with the HTTP 401 (Unauthorized) status code. The
  2021. client MAY request a new access token and retry the protected
  2022. resource request.
  2023. "insufficient_scope": The request requires higher privileges
  2024. (scopes) than provided by the scopes granted to the client and
  2025. represented by the access token. The resource server SHOULD
  2026. respond with the HTTP 403 (Forbidden) status code and MAY include
  2027. the scope attribute with the scope necessary to access the
  2028. protected resource.
  2029. Extensions may define additional error codes or specify additional
  2030. circumstances in which the above error codes are returned.
  2031. Hardt, et al. Expires 3 September 2026 [Page 52]
  2032. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2033. If the request lacks any authentication information (e.g., the client
  2034. was unaware that authentication is necessary or attempted using an
  2035. unsupported authentication method), the resource server SHOULD NOT
  2036. include an error code or other error information.
  2037. For example:
  2038. HTTP/1.1 401 Unauthorized
  2039. WWW-Authenticate: Bearer realm="example"
  2040. And in response to a protected resource request with an
  2041. authentication attempt using an expired access token:
  2042. HTTP/1.1 401 Unauthorized
  2043. WWW-Authenticate: Bearer realm="example",
  2044. error="invalid_token",
  2045. error_description="The access token expired"
  2046. 6. Extensibility
  2047. 6.1. Defining Access Token Types
  2048. Access token types can be defined in one of two ways: registered in
  2049. the Access Token Types registry (following the procedures in
  2050. Section 11.1 of [RFC6749]), or by using a unique absolute URI as its
  2051. name.
  2052. 6.1.1. Registered Access Token Types
  2053. [RFC6750] establishes a common registry in Section 11.4 of [RFC6749]
  2054. for error values to be shared among OAuth token authentication
  2055. schemes.
  2056. New authentication schemes designed primarily for OAuth token
  2057. authentication SHOULD define a mechanism for providing an error
  2058. status code to the client, in which the error values allowed are
  2059. registered in the error registry established by this specification.
  2060. Such schemes MAY limit the set of valid error codes to a subset of
  2061. the registered values. If the error code is returned using a named
  2062. parameter, the parameter name SHOULD be error.
  2063. Other schemes capable of being used for OAuth token authentication,
  2064. but not primarily designed for that purpose, MAY bind their error
  2065. values to the registry in the same manner.
  2066. Hardt, et al. Expires 3 September 2026 [Page 53]
  2067. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2068. New authentication schemes MAY choose to also specify the use of the
  2069. error_description and error_uri parameters to return error
  2070. information in a manner parallel to their usage in this
  2071. specification.
  2072. Type names MUST conform to the type-name ABNF. If the type
  2073. definition includes a new HTTP authentication scheme, the type name
  2074. SHOULD be identical to the HTTP authentication scheme name (as
  2075. defined by [RFC2617]). The token type example is reserved for use in
  2076. examples.
  2077. type-name = 1*name-char
  2078. name-char = "-" / "." / "_" / DIGIT / ALPHA
  2079. 6.1.2. Vendor-Specific Access Token Types
  2080. Types utilizing a URI name SHOULD be limited to vendor-specific
  2081. implementations that are not commonly applicable, and are specific to
  2082. the implementation details of the resource server where they are
  2083. used.
  2084. All other types MUST be registered.
  2085. 6.2. Defining New Endpoint Parameters
  2086. New request or response parameters for use with the authorization
  2087. endpoint or the token endpoint are defined and registered in the
  2088. OAuth Parameters registry following the procedure in Section 11.2 of
  2089. [RFC6749].
  2090. Parameter names MUST conform to the param-name ABNF, and parameter
  2091. values syntax MUST be well-defined (e.g., using ABNF, or a reference
  2092. to the syntax of an existing parameter).
  2093. param-name = 1*name-char
  2094. name-char = "-" / "." / "_" / DIGIT / ALPHA
  2095. Unregistered vendor-specific parameter extensions that are not
  2096. commonly applicable and that are specific to the implementation
  2097. details of the authorization server where they are used SHOULD
  2098. utilize a vendor-specific prefix that is not likely to conflict with
  2099. other registered values (e.g., begin with 'companyname_').
  2100. Hardt, et al. Expires 3 September 2026 [Page 54]
  2101. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2102. 6.3. Defining New Authorization Grant Types
  2103. New authorization grant types can be defined by assigning them a
  2104. unique absolute URI for use with the grant_type parameter. If the
  2105. extension grant type requires additional token endpoint parameters,
  2106. they MUST be registered in the OAuth Parameters registry as described
  2107. by Section 11.2 of [RFC6749].
  2108. 6.4. Defining New Authorization Endpoint Response Types
  2109. New response types for use with the authorization endpoint are
  2110. defined and registered in the Authorization Endpoint Response Types
  2111. registry following the procedure in Section 11.3 of [RFC6749].
  2112. Response type names MUST conform to the response-type ABNF.
  2113. response-type = response-name *( SP response-name )
  2114. response-name = 1*response-char
  2115. response-char = "_" / DIGIT / ALPHA
  2116. If a response type contains one or more space characters (%x20), it
  2117. is compared as a space-delimited list of values in which the order of
  2118. values does not matter. Only one order of values can be registered,
  2119. which covers all other arrangements of the same set of values.
  2120. For example, an extension can define and register the code
  2121. other_token response type. Once registered, the same combination
  2122. cannot be registered as other_token code, but both values can be used
  2123. to denote the same response type.
  2124. 6.5. Defining Additional Error Codes
  2125. In cases where protocol extensions (i.e., access token types,
  2126. extension parameters, or extension grant types) require additional
  2127. error codes to be used with the authorization code grant error
  2128. response (Section 4.1.2.1), the token error response (Section 3.2.4),
  2129. or the resource access error response (Section 5.3), such error codes
  2130. MAY be defined.
  2131. Extension error codes MUST be registered (following the procedures in
  2132. Section 11.4 of [RFC6749]) if the extension they are used in
  2133. conjunction with is a registered access token type, a registered
  2134. endpoint parameter, or an extension grant type. Error codes used
  2135. with unregistered extensions MAY be registered.
  2136. Error codes MUST conform to the error ABNF and SHOULD be prefixed by
  2137. an identifying name when possible. For example, an error identifying
  2138. an invalid value set to the extension parameter example SHOULD be
  2139. named example_invalid.
  2140. Hardt, et al. Expires 3 September 2026 [Page 55]
  2141. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2142. error = 1*error-char
  2143. error-char = %x20-21 / %x23-5B / %x5D-7E
  2144. 7. Security Considerations
  2145. As a flexible and extensible framework, OAuth's security
  2146. considerations depend on many factors. The following sections
  2147. provide implementers with security guidelines focused on the three
  2148. client profiles described in Section 2.1: web application, browser-
  2149. based application, and native application.
  2150. A comprehensive OAuth security model and analysis, as well as
  2151. background for the protocol design, is provided by [RFC6819] and
  2152. [RFC9700].
  2153. 7.1. Access Token Security Considerations
  2154. 7.1.1. Security Threats
  2155. The following list presents several common threats against protocols
  2156. utilizing some form of tokens. This list of threats is based on NIST
  2157. Special Publication 800-63 [NIST800-63].
  2158. 7.1.1.1. Access token manufacture/modification
  2159. An attacker may generate a bogus access token or modify the token
  2160. contents (such as the authentication or attribute statements) of an
  2161. existing token, causing the resource server to grant inappropriate
  2162. access to the client. For example, an attacker may modify the token
  2163. to extend the validity period; a malicious client may modify the
  2164. assertion to gain access to information that they should not be able
  2165. to view.
  2166. 7.1.1.2. Access token information disclosure
  2167. Access tokens may contain authentication and attribute statements
  2168. that include sensitive information.
  2169. If the client should be prevented from observing the contents of the
  2170. access token, content encryption MUST be applied.
  2171. Since cookies are by default transmitted in cleartext, any
  2172. information contained in them is at risk of disclosure: Bearer tokens
  2173. MUST NOT be stored in cookies that can be sent in the clear. See
  2174. Section 7 and 8 of [RFC6265] for security considerations about
  2175. cookies.
  2176. Hardt, et al. Expires 3 September 2026 [Page 56]
  2177. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2178. 7.1.1.3. Access token redirect
  2179. An attacker uses an access token generated for consumption by one
  2180. resource server to gain access to a different resource server that
  2181. mistakenly believes the token to be for it.
  2182. 7.1.1.4. Access token replay
  2183. An attacker attempts to use an access token that has already been
  2184. used with that resource server in the past.
  2185. 7.1.2. Threat Mitigation
  2186. A large range of threats can be mitigated by protecting the contents
  2187. of the access token by using a digital signature, and by following
  2188. best practices for signing key management such as periodic key
  2189. rotation.
  2190. Alternatively, a bearer token can contain a reference to
  2191. authorization information, rather than encoding the information
  2192. directly. Using a reference may require an extra interaction between
  2193. a resource server and authorization server to resolve the reference
  2194. to the authorization information. The mechanics of such an
  2195. interaction are not defined by this specification, but one such
  2196. mechanism is defined in Token Introspection [RFC7662].
  2197. This document does not specify the encoding or the contents of the
  2198. access token; hence, detailed recommendations about the means of
  2199. guaranteeing access token integrity protection are outside the scope
  2200. of this specification. One example of an encoding and signing
  2201. mechanism for access tokens is described in JSON Web Token Profile
  2202. for Access Tokens [RFC9068].
  2203. To deal with access token redirects, it is important for the
  2204. authorization server to include the identity of the intended
  2205. recipients (the audience), typically a single resource server (or a
  2206. list of resource servers), in the token. Restricting the use of the
  2207. token to a specific scope is also RECOMMENDED.
  2208. Section 1.5 provides information to protect against access token
  2209. disclosure and providing confidentiality and integrity for the
  2210. communications between client, resource server and authorization
  2211. server.
  2212. 7.1.3. Summary of Recommendations
  2213. Hardt, et al. Expires 3 September 2026 [Page 57]
  2214. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2215. 7.1.3.1. Safeguard bearer tokens
  2216. Client implementations MUST ensure that bearer tokens are not leaked
  2217. to unintended parties, as they will be able to use them to gain
  2218. access to protected resources. This is the primary security
  2219. consideration when using bearer tokens and underlies all the more
  2220. specific recommendations that follow.
  2221. 7.1.3.2. Validate TLS certificate chains
  2222. The client MUST validate the TLS certificate chain when making
  2223. requests to protected resources. Failing to do so may enable DNS
  2224. hijacking attacks to steal the token and gain unintended access.
  2225. 7.1.3.3. Always use TLS (https)
  2226. Clients MUST always use TLS (https) or equivalent transport security
  2227. when making requests with bearer tokens. Failing to do so exposes
  2228. the token to numerous attacks that could give attackers unintended
  2229. access.
  2230. 7.1.3.4. Don't store bearer tokens in HTTP cookies
  2231. Implementations MUST NOT store bearer tokens within cookies that can
  2232. be sent in the clear (which is the default transmission mode for
  2233. cookies). Implementations that do store bearer tokens in cookies
  2234. MUST take precautions against cross-site request forgery.
  2235. 7.1.3.5. Issue short-lived bearer tokens
  2236. Authorization servers SHOULD issue short-lived bearer tokens,
  2237. particularly when issuing tokens to clients that run within a web
  2238. browser or other environments where information leakage may occur.
  2239. Using short-lived bearer tokens can reduce the impact of them being
  2240. leaked.
  2241. 7.1.3.6. Issue scoped bearer tokens
  2242. Authorization servers SHOULD issue bearer tokens that contain an
  2243. audience restriction, scoping their use to the intended resource
  2244. server or set of resource servers.
  2245. Hardt, et al. Expires 3 September 2026 [Page 58]
  2246. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2247. 7.1.3.7. Don't pass bearer tokens in page URLs
  2248. Bearer tokens MUST NOT be passed in page URLs (for example, as query
  2249. string parameters). Instead, bearer tokens SHOULD be passed in HTTP
  2250. message headers or message bodies for which confidentiality measures
  2251. are taken. Browsers, web servers, and other software may not
  2252. adequately secure URLs in the browser history, web server logs, and
  2253. other data structures. If bearer tokens are passed in page URLs,
  2254. attackers might be able to steal them from the history data, logs, or
  2255. other unsecured locations.
  2256. 7.1.4. Access Token Privilege Restriction
  2257. The privileges associated with an access token SHOULD be restricted
  2258. to the minimum required for the particular application or use case.
  2259. This prevents clients from exceeding the privileges authorized by the
  2260. resource owner. It also prevents users from exceeding their
  2261. privileges authorized by the respective security policy. Privilege
  2262. restrictions also help to reduce the impact of access token leakage.
  2263. In particular, access tokens SHOULD be restricted to certain resource
  2264. servers (audience restriction), preferably to a single resource
  2265. server. To put this into effect, the authorization server associates
  2266. the access token with certain resource servers and every resource
  2267. server is obliged to verify, for every request, whether the access
  2268. token sent with that request was meant to be used for that particular
  2269. resource server. If not, the resource server MUST refuse to serve
  2270. the respective request. Clients and authorization servers MAY
  2271. utilize the parameters scope or resource as specified in this
  2272. document and [RFC8707], respectively, to determine the resource
  2273. server they want to access.
  2274. Additionally, access tokens SHOULD be restricted to certain resources
  2275. and actions on resource servers or resources. To put this into
  2276. effect, the authorization server associates the access token with the
  2277. respective resource and actions and every resource server is obliged
  2278. to verify, for every request, whether the access token sent with that
  2279. request was meant to be used for that particular action on the
  2280. particular resource. If not, the resource server must refuse to
  2281. serve the respective request. Clients and authorization servers MAY
  2282. utilize the parameter scope and authorization_details as specified in
  2283. [RFC9396] to determine those resources and/or actions.
  2284. 7.2. Client Authentication
  2285. Depending on the overall process of client registration and
  2286. credential lifecycle management, this may affect the confidence an
  2287. authorization server has in a particular client.
  2288. Hardt, et al. Expires 3 September 2026 [Page 59]
  2289. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2290. For example, authentication of a dynamically registered client does
  2291. not prove the identity of the client, it only ensures that repeated
  2292. requests to the authorization server were made from the same client
  2293. instance. Such clients may be limited in terms of which scopes they
  2294. are allowed to request, or may have other limitations such as shorter
  2295. token lifetimes.
  2296. In contrast, if there is a registered application whose developer's
  2297. identity was verified, who signed a contract and is issued a client
  2298. secret that is only used in a secure backend service, the
  2299. authorization server might allow this client to request more
  2300. sensitive scopes or to be issued longer-lasting tokens.
  2301. 7.3. Client Impersonation
  2302. If a confidential client has its credentials stolen, a malicious
  2303. client can impersonate the client and obtain access to protected
  2304. resources.
  2305. The authorization server SHOULD enforce explicit resource owner
  2306. authentication and provide the resource owner with information about
  2307. the client and the requested authorization scope and lifetime. It is
  2308. up to the resource owner to review the information in the context of
  2309. the current client and to authorize or deny the request.
  2310. The authorization server SHOULD NOT process repeated authorization
  2311. requests automatically (without active resource owner interaction)
  2312. without authenticating the client or relying on other measures to
  2313. ensure that the repeated request comes from the original client and
  2314. not an impersonator.
  2315. 7.3.1. Impersonation of Native Apps
  2316. As stated above, the authorization server SHOULD NOT process
  2317. authorization requests automatically without user consent or
  2318. interaction, except when the identity of the client can be assured.
  2319. This includes the case where the user has previously approved an
  2320. authorization request for a given client ID -- unless the identity of
  2321. the client can be proven, the request SHOULD be processed as if no
  2322. previous request had been approved.
  2323. Measures such as claimed https scheme redirects MAY be accepted by
  2324. authorization servers as identity proof. Some operating systems may
  2325. offer alternative platform-specific identity features that MAY be
  2326. accepted, as appropriate.
  2327. Hardt, et al. Expires 3 September 2026 [Page 60]
  2328. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2329. 7.3.2. Access Token Privilege Restriction
  2330. The client SHOULD request access tokens with the minimal scope
  2331. necessary. The authorization server SHOULD take the client identity
  2332. into account when choosing how to honor the requested scope and MAY
  2333. issue an access token with fewer scopes than requested.
  2334. The privileges associated with an access token SHOULD be restricted
  2335. to the minimum required for the particular application or use case.
  2336. This prevents clients from exceeding the privileges authorized by the
  2337. resource owner. It also prevents users from exceeding their
  2338. privileges authorized by the respective security policy. Privilege
  2339. restrictions also help to reduce the impact of access token leakage.
  2340. In particular, access tokens SHOULD be restricted to certain resource
  2341. servers (audience restriction), preferably to a single resource
  2342. server. To put this into effect, the authorization server associates
  2343. the access token with certain resource servers and every resource
  2344. server is obliged to verify, for every request, whether the access
  2345. token sent with that request was meant to be used for that particular
  2346. resource server. If not, the resource server MUST refuse to serve
  2347. the respective request. Clients and authorization servers MAY
  2348. utilize the parameters scope or resource as specified in [RFC8707],
  2349. respectively, to determine the resource server they want to access.
  2350. 7.4. Client Impersonating Resource Owner
  2351. Resource servers may make access control decisions based on the
  2352. identity of a resource owner for which an access token was issued, or
  2353. based on the identity of a client in the client credentials grant.
  2354. If both options are possible, depending on the details of the
  2355. implementation, a client's identity may be mistaken for the identity
  2356. of a resource owner. For example, if a client is able to choose its
  2357. own client_id during registration with the authorization server, a
  2358. malicious client may set it to a value identifying an end user (e.g.,
  2359. a sub value if OpenID Connect is used). If the resource server
  2360. cannot properly distinguish between access tokens issued to clients
  2361. and access tokens issued to end users, the client may then be able to
  2362. access resource of the end user.
  2363. Hardt, et al. Expires 3 September 2026 [Page 61]
  2364. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2365. If the authorization server has a common namespace for client IDs and
  2366. user identifiers, causing the resource server to be unable to
  2367. distinguish an access token authorized by a resource owner from an
  2368. access token authorized by a client itself, authorization servers
  2369. SHOULD NOT allow clients to influence their client_id or any other
  2370. Claim if that can cause confusion with a genuine resource owner.
  2371. Where this cannot be avoided, authorization servers MUST provide
  2372. other means for the resource server to distinguish between the two
  2373. types of access tokens.
  2374. 7.5. Authorization Code Security Considerations
  2375. 7.5.1. Authorization Code Injection
  2376. Authorization code injection is an attack where the client receives
  2377. an authorization code from the attacker in its redirect URI instead
  2378. of the authorization code from the legitimate authorization server.
  2379. Without protections in place, there is no mechanism by which the
  2380. client can know that the attack has taken place. Authorization code
  2381. injection can lead to both the attacker obtaining access to a
  2382. victim's account, as well as a victim accidentally gaining access to
  2383. the attacker's account.
  2384. 7.5.1.1. Countermeasures
  2385. To prevent injection of authorization codes into the client, using
  2386. code_challenge and code_verifier is REQUIRED for clients, and
  2387. authorization servers MUST enforce their use, unless both of the
  2388. following criteria are met:
  2389. * The client is a confidential client.
  2390. * In the specific deployment and the specific request, there is
  2391. reasonable assurance by the authorization server that the client
  2392. implements the OpenID Connect nonce mechanism properly.
  2393. In this case, using and enforcing code_challenge and code_verifier is
  2394. still RECOMMENDED.
  2395. The code_challenge or OpenID Connect nonce value MUST be transaction-
  2396. specific and securely bound to the client and the user agent in which
  2397. the transaction was started. If a transaction leads to an error,
  2398. fresh values for code_challenge or nonce MUST be chosen.
  2399. Relying on the client to validate the OpenID Connect nonce parameter
  2400. means the authorization server has no way to confirm that the client
  2401. has actually protected itself against authorization code injection
  2402. attacks. If an attacker is able to inject an authorization code into
  2403. Hardt, et al. Expires 3 September 2026 [Page 62]
  2404. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2405. a client, the client would still exchange the injected authorization
  2406. code and obtain tokens, and would only later reject the ID token
  2407. after validating the nonce and seeing that it doesn't match. In
  2408. contrast, the authorization server enforcing the code_challenge and
  2409. code_verifier parameters provides a higher security outcome, since
  2410. the authorization server is able to recognize the authorization code
  2411. injection attack pre-emptively and avoid issuing any tokens in the
  2412. first place.
  2413. Historic note: Although PKCE [RFC7636] (where the code_challenge and
  2414. code_verifier parameters were created) was originally designed as a
  2415. mechanism to protect native apps from authorization code exfiltration
  2416. attacks, all kinds of OAuth clients, including web applications and
  2417. other confidential clients, are susceptible to authorization code
  2418. injection attacks, which are solved by the code_challenge and
  2419. code_verifier mechanism.
  2420. 7.5.2. Reuse of Authorization Codes
  2421. Several types of attacks are possible if authorization codes are able
  2422. to be used more than once.
  2423. As described in Section 4.1.3, the authorization server must reject a
  2424. token request and revoke any issued tokens when receiving a second
  2425. valid request with an authorization code that has already been used
  2426. to issue an access token. If an attacker is able to exfiltrate an
  2427. authorization code and use it before the legitimate client, the
  2428. attacker will obtain the access token and the legitimate client will
  2429. not. Revoking any issued tokens means the attacker's tokens will
  2430. then be revoked, stopping the attack from proceeding any further.
  2431. However, the authorization server should only revoke issued tokens if
  2432. the request containing the authorization code is also valid,
  2433. including any other parameters such as the code_verifier and client
  2434. authentication. The authorization server SHOULD NOT revoke any
  2435. issued tokens when receiving a replayed authorization code that
  2436. contains invalid parameters. If it were to do so, this would create
  2437. a denial of service opportunity for an attacker who is able to obtain
  2438. an authorization code but unable to obtain the client authentication
  2439. or code_verifier by sending an invalid authorization code request
  2440. before the legitimate client and thereby revoking the legitimate
  2441. client's tokens once it makes the valid request.
  2442. Hardt, et al. Expires 3 September 2026 [Page 63]
  2443. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2444. 7.5.3. HTTP 307 Redirect
  2445. An authorization server which redirects a request that potentially
  2446. contains user credentials MUST NOT use the 307 status code
  2447. (Section 15.4.8 of [RFC9110]) for redirection. If an HTTP
  2448. redirection (and not, for example, JavaScript) is used for such a
  2449. request, AS SHOULD use the status code 303 ("See Other").
  2450. At the authorization endpoint, a typical protocol flow is that the AS
  2451. prompts the user to enter their credentials in a form that is then
  2452. submitted (using the POST method) back to the authorization server.
  2453. The AS checks the credentials and, if successful, redirects the user
  2454. agent to the client's redirect URI.
  2455. If the status code 307 were used for redirection, the user agent
  2456. would send the user credentials via a POST request to the client.
  2457. This discloses the sensitive credentials to the client. If the
  2458. client is malicious, it can use the credentials to impersonate the
  2459. user at the AS.
  2460. The behavior might be unexpected for developers, but is defined in
  2461. Section 15.4.8 of [RFC9110]. This status code does not require the
  2462. user agent to rewrite the POST request to a GET request and thereby
  2463. drop the form data in the POST request content.
  2464. In HTTP [RFC9110], only the status code 303 unambiguously enforces
  2465. rewriting the HTTP POST request to an HTTP GET request. For all
  2466. other status codes, including the popular 302, user agents can opt
  2467. not to rewrite POST to GET requests and therefore reveal the user
  2468. credentials to the client. (In practice, however, most user agents
  2469. will only show this behaviour for 307 redirects.)
  2470. 7.6. Ensuring Endpoint Authenticity
  2471. The risk related to man-in-the-middle attacks is mitigated by the
  2472. mandatory use of channel security mechanisms such as [RFC8446] for
  2473. communicating with the Authorization and Token Endpoints. See
  2474. Section 1.5 for further details.
  2475. 7.7. Credentials-Guessing Attacks
  2476. The authorization server MUST prevent attackers from guessing access
  2477. tokens, authorization codes, refresh tokens, resource owner
  2478. passwords, and client credentials.
  2479. Hardt, et al. Expires 3 September 2026 [Page 64]
  2480. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2481. The probability of an attacker guessing generated tokens (and other
  2482. credentials not intended for handling by end users) MUST be less than
  2483. or equal to 2^(-128) and SHOULD be less than or equal to 2^(-160).
  2484. The authorization server MUST utilize other means to protect
  2485. credentials intended for end-user usage.
  2486. 7.8. Phishing Attacks
  2487. Wide deployment of this and similar protocols may cause end users to
  2488. become inured to the practice of being redirected to websites where
  2489. they are asked to enter their passwords. If end users are not
  2490. careful to verify the authenticity of these websites before entering
  2491. their credentials, it will be possible for attackers to exploit this
  2492. practice to steal resource owners' passwords, and other phishable
  2493. credentials such as OTPs.
  2494. Service providers should attempt to educate end users about the risks
  2495. phishing attacks pose and should provide mechanisms that make it easy
  2496. for end users to confirm the authenticity of their sites, such as
  2497. using phishing-resistant authenticators, as phishing resistant
  2498. authenticators will offer a credential to log in to a certain site to
  2499. the user only if the platform has successfully verified the site's
  2500. origin. Client developers should consider the security implications
  2501. of how they interact with the user agent (e.g., external, embedded),
  2502. and the ability of the end user to verify the authenticity of the
  2503. authorization server.
  2504. See Section 1.5 for further details on mitigating the risk of
  2505. phishing attacks.
  2506. 7.9. Cross-Site Request Forgery
  2507. An attacker might attempt to inject a request to the redirect URI of
  2508. the legitimate client on the victim's device, e.g., to cause the
  2509. client to access resources under the attacker's control. This is a
  2510. variant of an attack known as Cross-Site Request Forgery (CSRF).
  2511. The traditional countermeasure is that clients pass a random value,
  2512. also known as a CSRF Token, in the state parameter that links the
  2513. request to the redirect URI to the user agent session as described.
  2514. This countermeasure is described in detail in Section 5.3.5 of
  2515. [RFC6819]. The same protection is provided by the code_verifier
  2516. parameter or the OpenID Connect nonce value.
  2517. When using code_verifier instead of state or nonce for CSRF
  2518. protection, it is important to note that:
  2519. Hardt, et al. Expires 3 September 2026 [Page 65]
  2520. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2521. * Clients MUST ensure that the AS supports the code_challenge_method
  2522. intended to be used by the client. If an authorization server
  2523. does not support the requested method, state or nonce MUST be used
  2524. for CSRF protection instead.
  2525. * If state is used for carrying application state, and integrity of
  2526. its contents is a concern, clients MUST protect state against
  2527. tampering and swapping. This can be achieved by binding the
  2528. contents of state to the browser session and/or signed/encrypted
  2529. state values [I-D.bradley-oauth-jwt-encoded-state].
  2530. AS therefore MUST provide a way to detect their supported code
  2531. challenge methods either via AS metadata according to [RFC8414] or
  2532. provide a deployment-specific way to ensure or determine support.
  2533. 7.10. Clickjacking
  2534. As described in Section 4.4.1.9 of [RFC6819], the authorization
  2535. request is susceptible to clickjacking attacks, also called user
  2536. interface redressing. In such an attack, an attacker embeds the
  2537. authorization endpoint user interface in an innocuous context. A
  2538. user believing to interact with that context, for example, clicking
  2539. on buttons, inadvertently interacts with the authorization endpoint
  2540. user interface instead. The opposite can be achieved as well: A user
  2541. believing to interact with the authorization endpoint might
  2542. inadvertently type a password into an attacker-provided input field
  2543. overlaid over the original user interface. Clickjacking attacks can
  2544. be designed such that users can hardly notice the attack, for example
  2545. using almost invisible iframes overlaid on top of other elements.
  2546. An attacker can use this vector to obtain the user's authentication
  2547. credentials, change the scope of access granted to the client, and
  2548. potentially access the user's resources.
  2549. Authorization servers MUST prevent clickjacking attacks. Multiple
  2550. countermeasures are described in [RFC6819], including the use of the
  2551. X-Frame-Options HTTP response header field and frame-busting
  2552. JavaScript. In addition to those, authorization servers SHOULD also
  2553. use Content Security Policy (CSP) level 2 [CSP-2] or greater.
  2554. Hardt, et al. Expires 3 September 2026 [Page 66]
  2555. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2556. To be effective, CSP must be used on the authorization endpoint and,
  2557. if applicable, other endpoints used to authenticate the user and
  2558. authorize the client (e.g., the device authorization endpoint, login
  2559. pages, error pages, etc.). This prevents framing by unauthorized
  2560. origins in user agents that support CSP. The client MAY permit being
  2561. framed by some other origin than the one used in its redirection
  2562. endpoint. For this reason, authorization servers SHOULD allow
  2563. administrators to configure allowed origins for particular clients
  2564. and/or for clients to register these dynamically.
  2565. Using CSP allows authorization servers to specify multiple origins in
  2566. a single response header field and to constrain these using flexible
  2567. patterns (see [CSP-2] for details). Level 2 of this standard
  2568. provides a robust mechanism for protecting against clickjacking by
  2569. using policies that restrict the origin of frames (using frame-
  2570. ancestors) together with those that restrict the sources of scripts
  2571. allowed to execute on an HTML page (by using script-src). A non-
  2572. normative example of such a policy is shown in the following listing:
  2573. HTTP/1.1 200 OK
  2574. Content-Security-Policy: frame-ancestors https://ext.example.org:8000
  2575. Content-Security-Policy: script-src 'self'
  2576. X-Frame-Options: ALLOW-FROM https://ext.example.org:8000
  2577. ...
  2578. Because some user agents do not support [CSP-2], this technique
  2579. SHOULD be combined with others, including those described in
  2580. [RFC6819], unless such legacy user agents are explicitly unsupported
  2581. by the authorization server. Even in such cases, additional
  2582. countermeasures SHOULD still be employed.
  2583. 7.11. Injection and Input Validation
  2584. An injection attack occurs when an input or otherwise external
  2585. variable is used by an application unsanitized and causes
  2586. modification to the application logic. This may allow an attacker to
  2587. gain access to the application device or its data, cause denial of
  2588. service, or introduce a wide range of malicious side-effects.
  2589. The authorization server and client MUST treat parameters received as
  2590. potentially malicious external input and apply appropriate
  2591. protections, in particular, the values of the state and redirect_uri
  2592. parameters.
  2593. Hardt, et al. Expires 3 September 2026 [Page 67]
  2594. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2595. 7.12. Open Redirection
  2596. An open redirector is an endpoint that forwards a user's browser to
  2597. an arbitrary URI obtained from a query parameter. Such endpoints are
  2598. sometimes implemented, for example, to show a message before a user
  2599. is then redirected to an external website, or to redirect users back
  2600. to a URL they were intending to visit before being interrupted, e.g.,
  2601. by a login prompt.
  2602. The following attacks can occur when an AS or client has an open
  2603. redirector.
  2604. 7.12.1. Client as Open Redirector
  2605. Clients MUST NOT expose open redirectors. Attackers may use open
  2606. redirectors to produce URLs pointing to the client and utilize them
  2607. to exfiltrate authorization codes, as described in Section 4.1.1 of
  2608. [RFC9700]. Another abuse case is to produce URLs that appear to
  2609. point to the client. This might trick users into trusting the URL
  2610. and follow it in their browser. This can be abused for phishing.
  2611. In order to prevent open redirection, clients should only redirect if
  2612. the target URLs are whitelisted or if the origin and integrity of a
  2613. request can be authenticated. Countermeasures against open
  2614. redirection are described by OWASP [owasp_redir].
  2615. 7.12.2. Authorization Server as Open Redirector
  2616. Just as with clients, attackers could try to utilize a user's trust
  2617. in the authorization server (and its URL in particular) for
  2618. performing phishing attacks. OAuth authorization servers regularly
  2619. redirect users to other web sites (the clients), but must do so
  2620. safely.
  2621. Section 4.1.2.1 already prevents open redirects by stating that the
  2622. authorization server MUST NOT automatically redirect the user agent
  2623. in case of an invalid combination of client_id and redirect_uri.
  2624. However, an attacker could also utilize a correctly registered
  2625. redirect URI to perform phishing attacks. The attacker could, for
  2626. example, register a client via dynamic client registration [RFC7591]
  2627. and execute one of the following attacks:
  2628. 1. Intentionally send an erroneous authorization request, e.g., by
  2629. using an invalid scope value, thus instructing the authorization
  2630. server to redirect the user agent to its phishing site.
  2631. Hardt, et al. Expires 3 September 2026 [Page 68]
  2632. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2633. 2. Intentionally send a valid authorization request with client_id
  2634. and redirect_uri controlled by the attacker. After the user
  2635. authenticates, the authorization server prompts the user to
  2636. provide consent to the request. If the user notices an issue
  2637. with the request and declines the request, the authorization
  2638. server still redirects the user agent to the phishing site. In
  2639. this case, the user agent will be redirected to the phishing site
  2640. regardless of the action taken by the user.
  2641. 3. Intentionally send a valid silent authentication request
  2642. (prompt=none) with client_id and redirect_uri controlled by the
  2643. attacker. In this case, the authorization server will
  2644. automatically redirect the user agent to the phishing site.
  2645. The authorization server MUST take precautions to prevent these
  2646. threats. The authorization server MUST always authenticate the user
  2647. first and, with the exception of the silent authentication use case,
  2648. prompt the user for credentials when needed, before redirecting the
  2649. user. Based on its risk assessment, the authorization server needs
  2650. to decide whether it can trust the redirect URI or not. It could
  2651. take into account URI analytics done internally or through some
  2652. external service to evaluate the credibility and trustworthiness
  2653. content behind the URI, and the source of the redirect URI and other
  2654. client data.
  2655. The authorization server SHOULD only automatically redirect the user
  2656. agent if it trusts the redirect URI. If the URI is not trusted, the
  2657. authorization server MAY inform the user and rely on the user to make
  2658. the correct decision.
  2659. 7.13. Transport Security
  2660. In some deployments, including those utilizing load balancers, the
  2661. TLS connection to the resource server terminates prior to the actual
  2662. server that provides the resource. This could leave the token
  2663. unprotected between the front-end server where the TLS connection
  2664. terminates and the back-end server that provides the resource. In
  2665. such deployments, sufficient measures MUST be employed to ensure
  2666. confidentiality of the access token between the front-end and back-
  2667. end servers; encryption of the token is one such possible measure.
  2668. See Section 17.2 of [RFC9110] for further information.
  2669. Hardt, et al. Expires 3 September 2026 [Page 69]
  2670. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2671. 7.14. Authorization Server Mix-Up Mitigation
  2672. Mix-up is an attack on scenarios where an OAuth client interacts with
  2673. two or more authorization servers and at least one authorization
  2674. server is under the control of the attacker. This can be the case,
  2675. for example, if the attacker uses dynamic registration to register
  2676. the client at his own authorization server or if an authorization
  2677. server becomes compromised.
  2678. When an OAuth client can only interact with one authorization server,
  2679. a mix-up defense is not required. In scenarios where an OAuth client
  2680. interacts with two or more authorization servers, however, clients
  2681. MUST prevent mix-up attacks. Two different methods are discussed in
  2682. the following.
  2683. For both defenses, clients MUST store, for each authorization
  2684. request, the issuer they sent the authorization request to, bind this
  2685. information to the user agent, and check that the authorization
  2686. response was received from the correct issuer. Clients MUST ensure
  2687. that the subsequent access token request, if applicable, is sent to
  2688. the same issuer. The issuer serves, via the associated metadata, as
  2689. an abstract identifier for the combination of the authorization
  2690. endpoint and token endpoint that are to be used in the flow. If an
  2691. issuer identifier is not available, for example, if neither OAuth 2.0
  2692. Authorization Server Metadata [RFC8414] nor OpenID Connect Discovery
  2693. [OpenID.Discovery] are used, a different unique identifier for this
  2694. tuple or the tuple itself can be used instead. For brevity of
  2695. presentation, such a deployment-specific identifier will be subsumed
  2696. under the issuer (or issuer identifier) in the following.
  2697. Note: Just storing the authorization server URL is not sufficient to
  2698. identify mix-up attacks. An attacker might declare an uncompromised
  2699. AS's authorization endpoint URL as "their" AS URL, but declare a
  2700. token endpoint under their own control.
  2701. See Section 4.4 of [RFC9700] for a detailed description of several
  2702. types of mix-up attacks.
  2703. 7.14.1. Mix-Up Defense via Issuer Identification
  2704. This defense requires that the authorization server sends his issuer
  2705. identifier in the authorization response to the client. When
  2706. receiving the authorization response, the client MUST compare the
  2707. received issuer identifier to the stored issuer identifier. If there
  2708. is a mismatch, the client MUST abort the interaction.
  2709. There are different ways this issuer identifier can be transported to
  2710. the client:
  2711. Hardt, et al. Expires 3 September 2026 [Page 70]
  2712. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2713. * The issuer information can be transported, for example, via an
  2714. optional response parameter iss (see Section 4.1.2).
  2715. * When OpenID Connect is used and an ID Token is returned in the
  2716. authorization response, the client can evaluate the iss claim in
  2717. the ID Token.
  2718. In both cases, the iss value MUST be evaluated according to
  2719. [RFC9207].
  2720. While this defense may require using an additional parameter to
  2721. transport the issuer information, it is a robust and relatively
  2722. simple defense against mix-up.
  2723. 7.14.2. Mix-Up Defense via Distinct Redirect URIs
  2724. For this defense, clients MUST use a distinct redirect URI for each
  2725. issuer they interact with.
  2726. Clients MUST check that the authorization response was received from
  2727. the correct issuer by comparing the distinct redirect URI for the
  2728. issuer to the URI where the authorization response was received on.
  2729. If there is a mismatch, the client MUST abort the flow.
  2730. While this defense builds upon existing OAuth functionality, it
  2731. cannot be used in scenarios where clients only register once for the
  2732. use of many different issuers (as in some open banking schemes) and
  2733. due to the tight integration with the client registration, it is
  2734. harder to deploy automatically.
  2735. Furthermore, an attacker might be able to circumvent the protection
  2736. offered by this defense by registering a new client with the "honest"
  2737. AS using the redirect URI that the client assigned to the attacker's
  2738. AS. The attacker could then run the attack as described above,
  2739. replacing the client ID with the client ID of his newly created
  2740. client.
  2741. This defense SHOULD therefore only be used if other options are not
  2742. available.
  2743. 8. Native Applications
  2744. Native applications are clients installed and executed on the device
  2745. used by the resource owner (i.e., desktop applications or native
  2746. mobile applications). Native applications require special
  2747. consideration related to security, platform capabilities, and overall
  2748. end-user experience.
  2749. Hardt, et al. Expires 3 September 2026 [Page 71]
  2750. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2751. The guidance in this section is primarily in the context of native
  2752. mobile apps as opposed to desktop apps. The native mobile platforms
  2753. have matured more than the desktop platforms in terms of the
  2754. capabilities provided to app developers relevant to the OAuth flows
  2755. described here. While the guidance is primarily focused on mobile
  2756. apps, much of it generally can apply to desktop apps as well.
  2757. The authorization endpoint requires interaction between the client
  2758. and the resource owner's user agent. The best current practice is to
  2759. perform the OAuth authorization request in an external user agent
  2760. (typically the browser) rather than an embedded user agent (such as
  2761. one implemented with web-views).
  2762. The native application can capture the response from the
  2763. authorization server in several different ways with differing
  2764. security properties of each. For example, using a redirect URI with
  2765. an "app-claimed URL" or custom URL scheme registered with the
  2766. operating system to invoke the client as the handler, manual copy-
  2767. and-paste of the credentials, running a local web server, installing
  2768. a user agent extension, or by providing a redirect URI identifying a
  2769. server-hosted resource under the client's control, which in turn
  2770. makes the response available to the native application.
  2771. Previously, it was common for native apps to use embedded user agents
  2772. (commonly implemented with web-views) for OAuth authorization
  2773. requests. That approach has many drawbacks, including the host app
  2774. being able to copy user credentials and cookies as well as the user
  2775. needing to authenticate from scratch in each app. See Section 8.5.1
  2776. for a deeper analysis of the drawbacks of using embedded user agents
  2777. for OAuth.
  2778. Native app authorization requests that use the system browser are
  2779. more secure and can take advantage of the user's authentication state
  2780. on the device. Being able to use the existing authentication session
  2781. in the browser enables single sign-on, as users don't need to
  2782. authenticate to the authorization server each time they use a new app
  2783. (unless required by the authorization server policy).
  2784. Supporting authorization flows between a native app and the browser
  2785. is possible without changing the OAuth protocol itself, as the OAuth
  2786. authorization request and response are already defined in terms of
  2787. URIs. This encompasses URIs that can be used for inter-app
  2788. communication. Some OAuth server implementations that assume all
  2789. clients are confidential web clients will need to add an
  2790. understanding of public native app clients and the types of redirect
  2791. URIs they use to support this best practice.
  2792. Hardt, et al. Expires 3 September 2026 [Page 72]
  2793. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2794. 8.1. Client Authentication of Native Apps
  2795. Secrets that are statically included as part of an app distributed to
  2796. multiple users are not confidential secrets, as one user may inspect
  2797. their copy and learn the shared secret. For this reason,
  2798. authorization servers MUST NOT require client authentication of
  2799. native app clients using a shared secret, as this serves no value
  2800. beyond client identification which is already provided by the
  2801. client_id request parameter.
  2802. Authorization servers that still require a statically included shared
  2803. secret for native app clients MUST treat the client as a public
  2804. client (as defined in Section 2.1), and not accept the secret as
  2805. proof of the client's identity. Without additional measures, such
  2806. clients are subject to client impersonation (see Section 7.3.1).
  2807. 8.1.1. Registration of Native App Clients
  2808. Except when using a mechanism like Dynamic Client Registration
  2809. [RFC7591] to provision per-instance credentials, native apps are
  2810. classified as public clients, as defined in Section 2.1, and MUST be
  2811. registered with the authorization server as such. Authorization
  2812. servers MUST record the client type in the client registration
  2813. details in order to identify and process requests accordingly.
  2814. 8.1.2. Native App Attestation
  2815. The draft specification
  2816. [I-D.ietf-oauth-attestation-based-client-auth] defines a mechanism
  2817. that can be used by a native app to obtain a key-bound attestation to
  2818. authenticate to an authorization server or resource server. This can
  2819. provide a higher level of assurance of a mobile app's identity.
  2820. 8.2. Using Inter-App URI Communication for OAuth in Native Apps
  2821. Just as URIs are used for OAuth on the web to initiate the
  2822. authorization request and return the authorization response to the
  2823. requesting website, URIs can be used by native apps to initiate the
  2824. authorization request in the device's browser and return the response
  2825. to the requesting native app.
  2826. By adopting the same methods used on the web for OAuth, benefits seen
  2827. in the web context like the usability of a single sign-on session and
  2828. the security of a separate authentication context are likewise gained
  2829. in the native app context. Reusing the same approach also reduces
  2830. the implementation complexity and increases interoperability by
  2831. relying on standards-based web flows that are not specific to a
  2832. particular platform.
  2833. Hardt, et al. Expires 3 September 2026 [Page 73]
  2834. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2835. Native apps MUST use an external user agent to perform OAuth
  2836. authorization requests. This is achieved by opening the
  2837. authorization request in the browser (detailed in Section 8.3) and
  2838. using a redirect URI that will return the authorization response back
  2839. to the native app (defined in Section 8.4).
  2840. 8.3. Initiating the Authorization Request from a Native App
  2841. Native apps needing user authorization create an authorization
  2842. request URI with the authorization code grant type per Section 4.1
  2843. using a redirect URI capable of being received by the native app.
  2844. The function of the redirect URI for a native app authorization
  2845. request is similar to that of a web-based authorization request.
  2846. Rather than returning the authorization response to the OAuth
  2847. client's server, the redirect URI used by a native app returns the
  2848. response to the app. Several options for a redirect URI that will
  2849. return the authorization response to the native app in different
  2850. platforms are documented in Section 8.4. Any redirect URI that
  2851. allows the app to receive the URI and inspect its parameters is
  2852. viable.
  2853. After constructing the authorization request URI, the app uses
  2854. platform-specific APIs to open the URI in an external user agent.
  2855. Typically, the external user agent used is the default browser, that
  2856. is, the application configured for handling http and https scheme
  2857. URIs on the system; however, different browser selection criteria and
  2858. other categories of external user agents MAY be used.
  2859. This best practice focuses on the browser as the RECOMMENDED external
  2860. user agent for native apps. An external user agent designed
  2861. specifically for user authorization and capable of processing
  2862. authorization requests and responses like a browser MAY also be used.
  2863. Other external user agents, such as a native app provided by the
  2864. authorization server may meet the criteria set out in this best
  2865. practice, including using the same redirect URI properties, but their
  2866. use is out of scope for this specification.
  2867. Some platforms support a browser feature known as "in-app browser
  2868. tabs", where an app can present a tab of the browser within the app
  2869. context without switching apps, but still retain key benefits of the
  2870. browser such as a shared authentication state and security context.
  2871. On platforms where they are supported, it is RECOMMENDED, for
  2872. usability reasons, that apps use in-app browser tabs for the
  2873. authorization request.
  2874. Hardt, et al. Expires 3 September 2026 [Page 74]
  2875. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2876. 8.4. Receiving the Authorization Response in a Native App
  2877. There are several redirect URI options available to native apps for
  2878. receiving the authorization response from the browser, the
  2879. availability and user experience of which varies by platform.
  2880. 8.4.1. Claimed "https" Scheme URI Redirection
  2881. Some operating systems, in particular mobile operating systems, allow
  2882. apps to claim https URIs (see Section 4.2.2 of [RFC9110]) in the
  2883. domains they control. When the browser encounters a claimed URI,
  2884. instead of the page being loaded in the browser, the native app is
  2885. launched with the URI supplied as a launch parameter.
  2886. Such URIs can be used as redirect URIs by native apps. They are
  2887. indistinguishable to the authorization server from a regular web-
  2888. based client redirect URI. An example is:
  2889. https://app.example.com/oauth2redirect/example-provider
  2890. As the redirect URI alone is not enough to distinguish public native
  2891. app clients from confidential web clients, it is REQUIRED in
  2892. Section 8.1.1 that the client type be recorded during client
  2893. registration to enable the server to determine the client type and
  2894. act accordingly.
  2895. App-claimed https scheme redirect URIs have some advantages compared
  2896. to other native app redirect options in that the identity of the
  2897. destination app is guaranteed to the authorization server by the
  2898. operating system. For this reason, native apps SHOULD use them over
  2899. the other options where possible.
  2900. 8.4.2. Loopback Interface Redirection
  2901. Native apps that are able to open a port on the loopback network
  2902. interface without needing special permissions (typically, those on
  2903. desktop operating systems) can use the loopback interface to receive
  2904. the OAuth redirect.
  2905. Loopback redirect URIs use the http scheme and are constructed with
  2906. the loopback IP literal and whatever port the client is listening on.
  2907. That is, http://127.0.0.1:{port}/{path} for IPv4, and
  2908. http://[::1]:{port}/{path} for IPv6. An example redirect using the
  2909. IPv4 loopback interface with a randomly assigned port:
  2910. http://127.0.0.1:51004/oauth2redirect/example-provider
  2911. Hardt, et al. Expires 3 September 2026 [Page 75]
  2912. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2913. An example redirect using the IPv6 loopback interface with a randomly
  2914. assigned port:
  2915. http://[::1]:61023/oauth2redirect/example-provider
  2916. While redirect URIs using the name localhost (i.e.,
  2917. http://localhost:{port}/{path}) function similarly to loopback IP
  2918. redirects, the use of localhost is NOT RECOMMENDED. Specifying a
  2919. redirect URI with the loopback IP literal rather than localhost
  2920. avoids inadvertently listening on network interfaces other than the
  2921. loopback interface. It is also less susceptible to client-side
  2922. firewalls and misconfigured host name resolution on the user's
  2923. device.
  2924. The authorization server MUST allow any port to be specified at the
  2925. time of the request for loopback IP redirect URIs, to accommodate
  2926. clients that obtain an available ephemeral port from the operating
  2927. system at the time of the request.
  2928. Clients SHOULD NOT assume that the device supports a particular
  2929. version of the Internet Protocol. It is RECOMMENDED that clients
  2930. attempt to bind to the loopback interface using both IPv4 and IPv6
  2931. and use whichever is available.
  2932. 8.4.3. Private-Use URI Scheme Redirection
  2933. Many mobile and desktop computing platforms support inter-app
  2934. communication via URIs by allowing apps to register private-use URI
  2935. schemes (sometimes colloquially referred to as "custom URL schemes")
  2936. like com.example.app. When the browser or another app attempts to
  2937. load a URI with a private-use URI scheme, the app that registered it
  2938. is launched to handle the request.
  2939. Many environments that support private-use URI schemes do not provide
  2940. a mechanism to claim a scheme and prevent other parties from using
  2941. another application's scheme. As such, clients using private-use URI
  2942. schemes are vulnerable to potential attacks on their redirect URIs,
  2943. so this option should only be used if the previously mentioned more
  2944. secure options are not available.
  2945. To perform an authorization request with a private-use URI scheme
  2946. redirect, the native app launches the browser with a standard
  2947. authorization request, but one where the redirect URI utilizes a
  2948. private-use URI scheme it registered with the operating system.
  2949. Hardt, et al. Expires 3 September 2026 [Page 76]
  2950. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2951. When choosing a URI scheme to associate with the app, apps MUST use a
  2952. URI scheme based on a domain name under their control, expressed in
  2953. reverse order, as recommended by Section 3.8 of [RFC7595] for
  2954. private-use URI schemes.
  2955. For example, an app that controls the domain name app.example.com can
  2956. use com.example.app as their scheme. Some authorization servers
  2957. assign client identifiers based on domain names, for example,
  2958. client1234.usercontent.example.net, which can also be used as the
  2959. domain name for the scheme when reversed in the same manner. A
  2960. scheme such as myapp, however, would not meet this requirement, as it
  2961. is not based on a domain name.
  2962. When there are multiple apps by the same publisher, care must be
  2963. taken so that each scheme is unique within that group. On platforms
  2964. that use app identifiers based on reverse-order domain names, those
  2965. identifiers can be reused as the private-use URI scheme for the OAuth
  2966. redirect to help avoid this problem.
  2967. Following the requirements of Section 3.2 of [RFC3986], as there is
  2968. no naming authority for private-use URI scheme redirects, only a
  2969. single slash (/) appears after the scheme component. A complete
  2970. example of a redirect URI utilizing a private-use URI scheme is:
  2971. com.example.app:/oauth2redirect/example-provider
  2972. When the authorization server completes the request, it redirects to
  2973. the client's redirect URI as it would normally. As the redirect URI
  2974. uses a private-use URI scheme, it results in the operating system
  2975. launching the native app, passing in the URI as a launch parameter.
  2976. Then, the native app uses normal processing for the authorization
  2977. response.
  2978. 8.5. Security Considerations in Native Apps
  2979. 8.5.1. Embedded User Agents in Native Apps
  2980. Embedded user agents are a technically possible method for
  2981. authorizing native apps. These embedded user agents are unsafe for
  2982. use by third parties to the authorization server by definition, as
  2983. the app that hosts the embedded user agent can access the user's full
  2984. authentication credentials, not just the OAuth authorization grant
  2985. that was intended for the app. They are also typically sandboxed by
  2986. the operating system and mechanisms such as WebAuthn that rely on the
  2987. web origin are disabled.
  2988. Hardt, et al. Expires 3 September 2026 [Page 77]
  2989. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  2990. In typical web-view-based implementations of embedded user agents,
  2991. the host application can record every keystroke entered in the login
  2992. form to capture usernames and passwords, automatically submit forms
  2993. to bypass user consent, and copy session cookies and use them to
  2994. perform authenticated actions as the user.
  2995. Even when used by trusted apps belonging to the same party as the
  2996. authorization server, embedded user agents violate the principle of
  2997. least privilege by having access to more powerful credentials than
  2998. they need, potentially increasing the attack surface.
  2999. Encouraging users to enter credentials in an embedded user agent
  3000. without the usual address bar and visible certificate validation
  3001. features that browsers have makes it impossible for the user to know
  3002. if they are signing in to the legitimate site; even when they are, it
  3003. trains them that it's OK to enter credentials without validating the
  3004. site first.
  3005. Aside from the security concerns, embedded user agents do not share
  3006. the authentication state with other apps or the browser, requiring
  3007. the user to log in for every authorization request, which is often
  3008. considered an inferior user experience.
  3009. 8.5.2. Fake External User-Agents in Native Apps
  3010. The native app that is initiating the authorization request has a
  3011. large degree of control over the user interface and can potentially
  3012. present a fake external user agent, that is, an embedded user agent
  3013. made to appear as an external user agent.
  3014. When all good actors are using external user agents, the advantage is
  3015. that it is possible for security experts to detect bad actors, as
  3016. anyone faking an external user agent is provably bad. On the other
  3017. hand, if good and bad actors alike are using embedded user agents,
  3018. bad actors don't need to fake anything, making them harder to detect.
  3019. Once a malicious app is detected, it may be possible to use this
  3020. knowledge to blacklist the app's signature in malware scanning
  3021. software, take removal action (in the case of apps distributed by app
  3022. stores) and other steps to reduce the impact and spread of the
  3023. malicious app.
  3024. Authorization servers can also directly protect against fake external
  3025. user agents by requiring an authentication factor only available to
  3026. true external user agents.
  3027. Hardt, et al. Expires 3 September 2026 [Page 78]
  3028. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3029. Users who are particularly concerned about their security when using
  3030. in-app browser tabs may also take the additional step of opening the
  3031. request in the full browser from the in-app browser tab and complete
  3032. the authorization there, as most implementations of the in-app
  3033. browser tab pattern offer such functionality.
  3034. 8.5.3. Malicious External User-Agents in Native Apps
  3035. If a malicious app is able to configure itself as the default handler
  3036. for https scheme URIs in the operating system, it will be able to
  3037. intercept authorization requests that use the default browser and
  3038. abuse this position of trust for malicious ends such as phishing the
  3039. user.
  3040. This attack is not confined to OAuth; a malicious app configured in
  3041. this way would present a general and ongoing risk to the user beyond
  3042. OAuth usage by native apps. Many operating systems mitigate this
  3043. issue by requiring an explicit user action to change the default
  3044. handler for http and https scheme URIs.
  3045. 8.5.4. Loopback Redirect Considerations in Native Apps
  3046. Loopback interface redirect URIs MAY use the http scheme (i.e.,
  3047. without TLS). This is acceptable for loopback interface redirect
  3048. URIs as the HTTP request never leaves the device.
  3049. Clients SHOULD open the network port only when starting the
  3050. authorization request and close it once the response is returned.
  3051. Clients SHOULD listen on the loopback network interface only, in
  3052. order to avoid interference by other network actors.
  3053. Clients SHOULD use loopback IP literals rather than the string
  3054. localhost as described in Section 8.4.2.
  3055. 9. Browser-Based Apps
  3056. Browser-based apps are clients that run in a web browser, typically
  3057. written in JavaScript, also known as "single-page apps". These types
  3058. of apps have particular security considerations similar to native
  3059. apps.
  3060. TODO: Bring in the normative text of the browser-based apps BCP when
  3061. it is finalized.
  3062. Hardt, et al. Expires 3 September 2026 [Page 79]
  3063. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3064. 10. Differences from OAuth 2.0
  3065. This draft consolidates the functionality in OAuth 2.0 [RFC6749],
  3066. OAuth 2.0 for Native Apps [RFC8252], Proof Key for Code Exchange
  3067. [RFC7636], OAuth 2.0 for Browser-Based Apps
  3068. [I-D.ietf-oauth-browser-based-apps], OAuth Security Best Current
  3069. Practice [RFC9700], and Bearer Token Usage [RFC6750].
  3070. Where a later draft updates or obsoletes functionality found in the
  3071. original [RFC6749], that functionality in this draft is updated with
  3072. the normative changes described in a later draft, or removed
  3073. entirely.
  3074. A non-normative list of changes from OAuth 2.0 is listed below:
  3075. * The authorization code grant is extended with the functionality
  3076. from PKCE [RFC7636] such that the default method of using the
  3077. authorization code grant according to this specification requires
  3078. the addition of the PKCE parameters
  3079. * Redirect URIs must be compared using exact string matching as per
  3080. Section 4.1.3 of [RFC9700]
  3081. * The Implicit grant (response_type=token) is omitted from this
  3082. specification as per Section 2.1.2 of [RFC9700]
  3083. * The Resource Owner Password Credentials grant is omitted from this
  3084. specification as per Section 2.4 of [RFC9700]
  3085. * Bearer token usage omits the use of bearer tokens in the query
  3086. string of URIs as per Section 4.3.2 of [RFC9700]
  3087. * Refresh tokens for public clients must either be sender-
  3088. constrained or one-time use as per Section 4.14.2 of [RFC9700]
  3089. * The token endpoint request containing an authorization code no
  3090. longer contains the redirect_uri parameter
  3091. * Authorization servers must support client credentials in the
  3092. request body
  3093. 10.1. Removal of the OAuth 2.0 Implicit grant
  3094. The OAuth 2.0 Implicit grant is omitted from OAuth 2.1 as it was
  3095. deprecated in [RFC9700].
  3096. Hardt, et al. Expires 3 September 2026 [Page 80]
  3097. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3098. The intent of removing the Implicit grant is to no longer issue
  3099. access tokens in the authorization response, as such tokens are
  3100. vulnerable to leakage and injection, and are unable to be sender-
  3101. constrained to a client. This behavior was indicated by clients
  3102. using the response_type=token parameter. This value for the
  3103. response_type parameter is no longer defined in OAuth 2.1.
  3104. Removal of response_type=token does not have an effect on other
  3105. extension response types returning other artifacts from the
  3106. authorization endpoint, for example, response_type=id_token defined
  3107. by [OpenID.Connect].
  3108. 10.2. Redirect URI Parameter in Token Request
  3109. In OAuth 2.0, the request to the token endpoint in the authorization
  3110. code flow (Section 4.1.3 of [RFC6749]) contains an optional
  3111. redirect_uri parameter. The parameter was intended to prevent an
  3112. authorization code injection attack, and was required if the
  3113. redirect_uri parameter was sent in the original authorization
  3114. request. The authorization request only required the redirect_uri
  3115. parameter if multiple redirect URIs were registered to the specific
  3116. client. However, in practice, many authorization server
  3117. implementations required the redirect_uri parameter in the
  3118. authorization request even if only one was registered, leading the
  3119. redirect_uri parameter to be required at the token endpoint as well.
  3120. In OAuth 2.1, authorization code injection is prevented by the
  3121. code_challenge and code_verifier parameters, making the inclusion of
  3122. the redirect_uri parameter serve no purpose in the token request. As
  3123. such, it has been removed.
  3124. For backwards compatibility of an authorization server wishing to
  3125. support both OAuth 2.0 and OAuth 2.1 clients, the authorization
  3126. server MUST allow clients to send the redirect_uri parameter in the
  3127. token request (Section 4.1.3), and MUST enforce the parameter as
  3128. described in [RFC6749]. The authorization server can use the
  3129. client_id in the request to determine whether to enforce this
  3130. behavior for the specific client that it knows will be using the
  3131. older OAuth 2.0 behavior.
  3132. A client following only the OAuth 2.1 recommendations will not send
  3133. the redirect_uri in the token request, and therefore will not be
  3134. compatible with an authorization server that expects the parameter in
  3135. the token request.
  3136. Hardt, et al. Expires 3 September 2026 [Page 81]
  3137. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3138. 11. IANA Considerations
  3139. This document does not require any IANA actions.
  3140. All referenced registries are defined by [RFC6749] and related
  3141. documents that this work is based upon. No changes to those
  3142. registries are required by this specification.
  3143. 12. References
  3144. 12.1. Normative References
  3145. [BCP195] Saint-Andre, P., "Recommendations for Secure Use of
  3146. Transport Layer Security (TLS)", 2015.
  3147. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
  3148. Requirement Levels", BCP 14, RFC 2119,
  3149. DOI 10.17487/RFC2119, March 1997,
  3150. <https://www.rfc-editor.org/info/rfc2119>.
  3151. [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
  3152. Leach, P., Luotonen, A., and L. Stewart, "HTTP
  3153. Authentication: Basic and Digest Access Authentication",
  3154. RFC 2617, DOI 10.17487/RFC2617, June 1999,
  3155. <https://www.rfc-editor.org/info/rfc2617>.
  3156. [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
  3157. 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November
  3158. 2003, <https://www.rfc-editor.org/info/rfc3629>.
  3159. [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
  3160. Resource Identifier (URI): Generic Syntax", STD 66,
  3161. RFC 3986, DOI 10.17487/RFC3986, January 2005,
  3162. <https://www.rfc-editor.org/info/rfc3986>.
  3163. [RFC4949] Shirey, R., "Internet Security Glossary, Version 2",
  3164. FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007,
  3165. <https://www.rfc-editor.org/info/rfc4949>.
  3166. [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
  3167. Specifications: ABNF", STD 68, RFC 5234,
  3168. DOI 10.17487/RFC5234, January 2008,
  3169. <https://www.rfc-editor.org/info/rfc5234>.
  3170. [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
  3171. RFC 6749, DOI 10.17487/RFC6749, October 2012,
  3172. <https://www.rfc-editor.org/info/rfc6749>.
  3173. Hardt, et al. Expires 3 September 2026 [Page 82]
  3174. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3175. [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization
  3176. Framework: Bearer Token Usage", RFC 6750,
  3177. DOI 10.17487/RFC6750, October 2012,
  3178. <https://www.rfc-editor.org/info/rfc6750>.
  3179. [RFC7235] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
  3180. Protocol (HTTP/1.1): Authentication", RFC 7235,
  3181. DOI 10.17487/RFC7235, June 2014,
  3182. <https://www.rfc-editor.org/info/rfc7235>.
  3183. [RFC7521] Campbell, B., Mortimore, C., Jones, M., and Y. Goland,
  3184. "Assertion Framework for OAuth 2.0 Client Authentication
  3185. and Authorization Grants", RFC 7521, DOI 10.17487/RFC7521,
  3186. May 2015, <https://www.rfc-editor.org/info/rfc7521>.
  3187. [RFC7523] Jones, M., Campbell, B., and C. Mortimore, "JSON Web Token
  3188. (JWT) Profile for OAuth 2.0 Client Authentication and
  3189. Authorization Grants", RFC 7523, DOI 10.17487/RFC7523, May
  3190. 2015, <https://www.rfc-editor.org/info/rfc7523>.
  3191. [RFC7595] Thaler, D., Ed., Hansen, T., and T. Hardie, "Guidelines
  3192. and Registration Procedures for URI Schemes", BCP 35,
  3193. RFC 7595, DOI 10.17487/RFC7595, June 2015,
  3194. <https://www.rfc-editor.org/info/rfc7595>.
  3195. [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
  3196. 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
  3197. May 2017, <https://www.rfc-editor.org/info/rfc8174>.
  3198. [RFC8252] Denniss, W. and J. Bradley, "OAuth 2.0 for Native Apps",
  3199. BCP 212, RFC 8252, DOI 10.17487/RFC8252, October 2017,
  3200. <https://www.rfc-editor.org/info/rfc8252>.
  3201. [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
  3202. Interchange Format", STD 90, RFC 8259,
  3203. DOI 10.17487/RFC8259, December 2017,
  3204. <https://www.rfc-editor.org/info/rfc8259>.
  3205. [RFC8446] Rescorla, E., "The Transport Layer Security (TLS) Protocol
  3206. Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
  3207. <https://www.rfc-editor.org/info/rfc8446>.
  3208. [RFC9110] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
  3209. Ed., "HTTP Semantics", STD 97, RFC 9110,
  3210. DOI 10.17487/RFC9110, June 2022,
  3211. <https://www.rfc-editor.org/info/rfc9110>.
  3212. Hardt, et al. Expires 3 September 2026 [Page 83]
  3213. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3214. [RFC9111] Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke,
  3215. Ed., "HTTP Caching", STD 98, RFC 9111,
  3216. DOI 10.17487/RFC9111, June 2022,
  3217. <https://www.rfc-editor.org/info/rfc9111>.
  3218. [RFC9207] Meyer zu Selhausen, K. and D. Fett, "OAuth 2.0
  3219. Authorization Server Issuer Identification", RFC 9207,
  3220. DOI 10.17487/RFC9207, March 2022,
  3221. <https://www.rfc-editor.org/info/rfc9207>.
  3222. [RFC9700] Lodderstedt, T., Bradley, J., Labunets, A., and D. Fett,
  3223. "Best Current Practice for OAuth 2.0 Security", BCP 240,
  3224. RFC 9700, DOI 10.17487/RFC9700, January 2025,
  3225. <https://www.rfc-editor.org/info/rfc9700>.
  3226. [USASCII] Institute, A. N. S., "Coded Character Set -- 7-bit
  3227. American Standard Code for Information Interchange, ANSI
  3228. X3.4", 1986.
  3229. [W3C.REC-xml-20081126]
  3230. Bray, T., Paoli, J., Sperberg-McQueen, C. M., Maler, E.,
  3231. and F. Yergeau, "Extensible Markup Language", November
  3232. 2008,
  3233. <https://www.w3.org/TR/REC-xml/REC-xml-20081126.xml>.
  3234. [WHATWG.CORS]
  3235. WHATWG, "Fetch Standard: CORS protocol", June 2023,
  3236. <https://fetch.spec.whatwg.org/#http-cors-protocol>.
  3237. [WHATWG.URL]
  3238. WHATWG, "URL", May 2022, <https://url.spec.whatwg.org/>.
  3239. 12.2. Informative References
  3240. [CSP-2] "Content Security Policy Level 2", December 2016,
  3241. <https://www.w3.org/TR/CSP2>.
  3242. [I-D.bradley-oauth-jwt-encoded-state]
  3243. Bradley, J., Lodderstedt, T., and H. Zandbelt, "Encoding
  3244. claims in the OAuth 2 state parameter using a JWT", Work
  3245. in Progress, Internet-Draft, draft-bradley-oauth-jwt-
  3246. encoded-state-09, 4 November 2018,
  3247. <https://datatracker.ietf.org/doc/html/draft-bradley-
  3248. oauth-jwt-encoded-state-09>.
  3249. [I-D.ietf-oauth-attestation-based-client-auth]
  3250. Looker, T., Bastian, P., and C. Bormann, "OAuth 2.0
  3251. Attestation-Based Client Authentication", Work in
  3252. Hardt, et al. Expires 3 September 2026 [Page 84]
  3253. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3254. Progress, Internet-Draft, draft-ietf-oauth-attestation-
  3255. based-client-auth-07, 15 September 2025,
  3256. <https://datatracker.ietf.org/doc/html/draft-ietf-oauth-
  3257. attestation-based-client-auth-07>.
  3258. [I-D.ietf-oauth-browser-based-apps]
  3259. Parecki, A., De Ryck, P., and D. Waite, "OAuth 2.0 for
  3260. Browser-Based Applications", Work in Progress, Internet-
  3261. Draft, draft-ietf-oauth-browser-based-apps-26, 3 December
  3262. 2025, <https://datatracker.ietf.org/doc/html/draft-ietf-
  3263. oauth-browser-based-apps-26>.
  3264. [I-D.ietf-oauth-rfc7523bis]
  3265. Jones, M. B., Campbell, B., Mortimore, C., and F. Skokan,
  3266. "Updates to OAuth 2.0 JSON Web Token (JWT) Client
  3267. Authentication and Assertion-Based Authorization Grants",
  3268. Work in Progress, Internet-Draft, draft-ietf-oauth-
  3269. rfc7523bis-05, 12 January 2026,
  3270. <https://datatracker.ietf.org/doc/html/draft-ietf-oauth-
  3271. rfc7523bis-05>.
  3272. [NIST800-63]
  3273. Burr, W., Dodson, D., Newton, E., Perlner, R., Polk, T.,
  3274. Gupta, S., and E. Nabbus, "NIST Special Publication
  3275. 800-63-1, INFORMATION SECURITY", December 2011,
  3276. <http://csrc.nist.gov/publications/>.
  3277. [OMAP] Huff, J., Schlacht, D., Nadalin, A., Simmons, J.,
  3278. Rosenberg, P., Madsen, P., Ace, T., Rickelton-Abdi, C.,
  3279. and B. Boyer, "Online Multimedia Authorization Protocol:
  3280. An Industry Standard for Authorized Access to Internet
  3281. Multimedia Resources", August 2012,
  3282. <https://www.svta.org/product/online-multimedia-
  3283. authorization-protocol/>.
  3284. [OpenID.Connect]
  3285. Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and
  3286. C. Mortimore, "OpenID Connect Core 1.0 incorporating
  3287. errata set 2", December 2023,
  3288. <https://openid.net/specs/openid-connect-core-1_0.html>.
  3289. [OpenID.Discovery]
  3290. Sakimura, N., Bradley, J., Jones, M., and E. Jay, "OpenID
  3291. Connect Discovery 1.0 incorporating errata set 2",
  3292. December 2023, <https://openid.net/specs/openid-connect-
  3293. discovery-1_0.html>.
  3294. Hardt, et al. Expires 3 September 2026 [Page 85]
  3295. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3296. [OpenID.Messages]
  3297. Sakimura, N., Bradley, J., Jones, M., de Medeiros, B.,
  3298. Mortimore, C., and E. Jay, "OpenID Connect Messages 1.0",
  3299. June 2012, <http://openid.net/specs/openid-connect-
  3300. messages-1_0.html>.
  3301. [owasp_redir]
  3302. "OWASP Cheat Sheet Series - Unvalidated Redirects and
  3303. Forwards", 2020,
  3304. <https://cheatsheetseries.owasp.org/cheatsheets/
  3305. Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html>.
  3306. [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265,
  3307. DOI 10.17487/RFC6265, April 2011,
  3308. <https://www.rfc-editor.org/info/rfc6265>.
  3309. [RFC6819] Lodderstedt, T., Ed., McGloin, M., and P. Hunt, "OAuth 2.0
  3310. Threat Model and Security Considerations", RFC 6819,
  3311. DOI 10.17487/RFC6819, January 2013,
  3312. <https://www.rfc-editor.org/info/rfc6819>.
  3313. [RFC7009] Lodderstedt, T., Ed., Dronia, S., and M. Scurtescu, "OAuth
  3314. 2.0 Token Revocation", RFC 7009, DOI 10.17487/RFC7009,
  3315. August 2013, <https://www.rfc-editor.org/info/rfc7009>.
  3316. [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
  3317. (JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
  3318. <https://www.rfc-editor.org/info/rfc7519>.
  3319. [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and
  3320. P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol",
  3321. RFC 7591, DOI 10.17487/RFC7591, July 2015,
  3322. <https://www.rfc-editor.org/info/rfc7591>.
  3323. [RFC7592] Richer, J., Ed., Jones, M., Bradley, J., and M. Machulak,
  3324. "OAuth 2.0 Dynamic Client Registration Management
  3325. Protocol", RFC 7592, DOI 10.17487/RFC7592, July 2015,
  3326. <https://www.rfc-editor.org/info/rfc7592>.
  3327. [RFC7636] Sakimura, N., Ed., Bradley, J., and N. Agarwal, "Proof Key
  3328. for Code Exchange by OAuth Public Clients", RFC 7636,
  3329. DOI 10.17487/RFC7636, September 2015,
  3330. <https://www.rfc-editor.org/info/rfc7636>.
  3331. [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection",
  3332. RFC 7662, DOI 10.17487/RFC7662, October 2015,
  3333. <https://www.rfc-editor.org/info/rfc7662>.
  3334. Hardt, et al. Expires 3 September 2026 [Page 86]
  3335. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3336. [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0
  3337. Authorization Server Metadata", RFC 8414,
  3338. DOI 10.17487/RFC8414, June 2018,
  3339. <https://www.rfc-editor.org/info/rfc8414>.
  3340. [RFC8628] Denniss, W., Bradley, J., Jones, M., and H. Tschofenig,
  3341. "OAuth 2.0 Device Authorization Grant", RFC 8628,
  3342. DOI 10.17487/RFC8628, August 2019,
  3343. <https://www.rfc-editor.org/info/rfc8628>.
  3344. [RFC8705] Campbell, B., Bradley, J., Sakimura, N., and T.
  3345. Lodderstedt, "OAuth 2.0 Mutual-TLS Client Authentication
  3346. and Certificate-Bound Access Tokens", RFC 8705,
  3347. DOI 10.17487/RFC8705, February 2020,
  3348. <https://www.rfc-editor.org/info/rfc8705>.
  3349. [RFC8707] Campbell, B., Bradley, J., and H. Tschofenig, "Resource
  3350. Indicators for OAuth 2.0", RFC 8707, DOI 10.17487/RFC8707,
  3351. February 2020, <https://www.rfc-editor.org/info/rfc8707>.
  3352. [RFC9068] Bertocci, V., "JSON Web Token (JWT) Profile for OAuth 2.0
  3353. Access Tokens", RFC 9068, DOI 10.17487/RFC9068, October
  3354. 2021, <https://www.rfc-editor.org/info/rfc9068>.
  3355. [RFC9126] Lodderstedt, T., Campbell, B., Sakimura, N., Tonge, D.,
  3356. and F. Skokan, "OAuth 2.0 Pushed Authorization Requests",
  3357. RFC 9126, DOI 10.17487/RFC9126, September 2021,
  3358. <https://www.rfc-editor.org/info/rfc9126>.
  3359. [RFC9396] Lodderstedt, T., Richer, J., and B. Campbell, "OAuth 2.0
  3360. Rich Authorization Requests", RFC 9396,
  3361. DOI 10.17487/RFC9396, May 2023,
  3362. <https://www.rfc-editor.org/info/rfc9396>.
  3363. [RFC9449] Fett, D., Campbell, B., Bradley, J., Lodderstedt, T.,
  3364. Jones, M., and D. Waite, "OAuth 2.0 Demonstrating Proof of
  3365. Possession (DPoP)", RFC 9449, DOI 10.17487/RFC9449,
  3366. September 2023, <https://www.rfc-editor.org/info/rfc9449>.
  3367. [RFC9470] Bertocci, V. and B. Campbell, "OAuth 2.0 Step Up
  3368. Authentication Challenge Protocol", RFC 9470,
  3369. DOI 10.17487/RFC9470, September 2023,
  3370. <https://www.rfc-editor.org/info/rfc9470>.
  3371. Hardt, et al. Expires 3 September 2026 [Page 87]
  3372. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3373. [W3C.REC-html401-19991224]
  3374. Hors, A. L., Ed., Raggett, D., Ed., and I. Jacobs, Ed.,
  3375. "HTML 4.01 Specification", W3C REC REC-html401-19991224,
  3376. W3C REC-html401-19991224, 24 December 1999,
  3377. <https://www.w3.org/TR/1999/REC-html401-19991224/>.
  3378. Appendix A. Augmented Backus-Naur Form (ABNF) Syntax
  3379. This section provides Augmented Backus-Naur Form (ABNF) syntax
  3380. descriptions for the elements defined in this specification using the
  3381. notation of [RFC5234]. The ABNF below is defined in terms of Unicode
  3382. code points [W3C.REC-xml-20081126]; these characters are typically
  3383. encoded in UTF-8. Elements are presented in the order first defined.
  3384. Some of the definitions that follow use the "URI-reference"
  3385. definition from [RFC3986].
  3386. Some of the definitions that follow use these common definitions:
  3387. VSCHAR = %x20-7E
  3388. NQCHAR = %x21 / %x23-5B / %x5D-7E
  3389. NQSCHAR = %x20-21 / %x23-5B / %x5D-7E
  3390. A.1. "client_id" Syntax
  3391. The client_id element is defined in Section 2.4.1:
  3392. client-id = *VSCHAR
  3393. A.2. "client_secret" Syntax
  3394. The client_secret element is defined in Section 2.4.1:
  3395. client-secret = *VSCHAR
  3396. A.3. "response_type" Syntax
  3397. The response_type element is defined in Section 4.1.1 and
  3398. Section 6.4:
  3399. response-type = response-name *( SP response-name )
  3400. response-name = 1*response-char
  3401. response-char = "_" / DIGIT / ALPHA
  3402. A.4. "scope" Syntax
  3403. The scope element is defined in Section 1.4.1:
  3404. Hardt, et al. Expires 3 September 2026 [Page 88]
  3405. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3406. scope = scope-token *( SP scope-token )
  3407. scope-token = 1*NQCHAR
  3408. A.5. "state" Syntax
  3409. The state element is defined in Section 4.1.1, Section 4.1.2, and
  3410. Section 4.1.2.1:
  3411. state = 1*VSCHAR
  3412. A.6. "redirect_uri" Syntax
  3413. The redirect_uri element is defined in Section 4.1.1, and
  3414. Section 4.1.3:
  3415. redirect-uri = URI-reference
  3416. A.7. "error" Syntax
  3417. The error element is defined in Sections Section 4.1.2.1,
  3418. Section 3.2.4, and Section 5.3:
  3419. error = 1*NQSCHAR
  3420. A.8. "error_description" Syntax
  3421. The error_description element is defined in Sections Section 4.1.2.1,
  3422. Section 3.2.4, and Section 5.3:
  3423. error-description = 1*NQSCHAR
  3424. A.9. "error_uri" Syntax
  3425. The error_uri element is defined in Sections Section 4.1.2.1,
  3426. Section 3.2.4, and Section 5.3:
  3427. error-uri = URI-reference
  3428. A.10. "grant_type" Syntax
  3429. The grant_type element is defined in Section Section 3.2.2:
  3430. grant-type = grant-name / URI-reference
  3431. grant-name = 1*name-char
  3432. name-char = "-" / "." / "_" / DIGIT / ALPHA
  3433. Hardt, et al. Expires 3 September 2026 [Page 89]
  3434. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3435. A.11. "code" Syntax
  3436. The code element is defined in Section 4.1.3:
  3437. code = 1*VSCHAR
  3438. A.12. "access_token" Syntax
  3439. The access_token element is defined in Section 3.2.3:
  3440. access-token = 1*VSCHAR
  3441. A.13. "token_type" Syntax
  3442. The token_type element is defined in Section 3.2.3, and Section 6.1:
  3443. token-type = type-name / URI-reference
  3444. type-name = 1*name-char
  3445. name-char = "-" / "." / "_" / DIGIT / ALPHA
  3446. A.14. "expires_in" Syntax
  3447. The expires_in element is defined in Section 3.2.3:
  3448. expires-in = 1*DIGIT
  3449. A.15. "refresh_token" Syntax
  3450. The refresh_token element is defined in Section 3.2.3 and
  3451. Section 4.3:
  3452. refresh-token = 1*VSCHAR
  3453. A.16. Endpoint Parameter Syntax
  3454. The syntax for new endpoint parameters is defined in Section 6.2:
  3455. param-name = 1*name-char
  3456. name-char = "-" / "." / "_" / DIGIT / ALPHA
  3457. A.17. "code_verifier" Syntax
  3458. ABNF for code_verifier is as follows.
  3459. code-verifier = 43*128unreserved
  3460. unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
  3461. ALPHA = %x41-5A / %x61-7A
  3462. DIGIT = %x30-39
  3463. Hardt, et al. Expires 3 September 2026 [Page 90]
  3464. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3465. A.18. "code_challenge" Syntax
  3466. ABNF for code_challenge is as follows.
  3467. code-challenge = 43*128unreserved
  3468. unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
  3469. ALPHA = %x41-5A / %x61-7A
  3470. DIGIT = %x30-39
  3471. Appendix B. Use of application/x-www-form-urlencoded Media Type
  3472. At the time of publication of [RFC6749], the application/x-www-form-
  3473. urlencoded media type was defined in Section 17.13.4 of
  3474. [W3C.REC-html401-19991224] but not registered in the IANA MIME Media
  3475. Types registry (http://www.iana.org/assignments/media-types
  3476. (http://www.iana.org/assignments/media-types)). Furthermore, that
  3477. definition is incomplete, as it does not consider non-US-ASCII
  3478. characters.
  3479. To address this shortcoming when generating contents using this media
  3480. type, names and values MUST be encoded using the UTF-8 character
  3481. encoding scheme [RFC3629] first; the resulting octet sequence then
  3482. needs to be further encoded using the escaping rules defined in
  3483. [W3C.REC-html401-19991224].
  3484. When parsing data from a content using this media type, the names and
  3485. values resulting from reversing the name/value encoding consequently
  3486. need to be treated as octet sequences, to be decoded using the UTF-8
  3487. character encoding scheme.
  3488. For example, the value consisting of the six Unicode code points (1)
  3489. U+0020 (SPACE), (2) U+0025 (PERCENT SIGN), (3) U+0026 (AMPERSAND),
  3490. (4) U+002B (PLUS SIGN), (5) U+00A3 (POUND SIGN), and (6) U+20AC (EURO
  3491. SIGN) would be encoded into the octet sequence below (using
  3492. hexadecimal notation):
  3493. 20 25 26 2B C2 A3 E2 82 AC
  3494. and then represented in the content as:
  3495. +%25%26%2B%C2%A3%E2%82%AC
  3496. Hardt, et al. Expires 3 September 2026 [Page 91]
  3497. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3498. Appendix C. Serializations
  3499. Various messages in this specification are serialized using one of
  3500. the methods described below. This section describes the syntax of
  3501. these serialization methods; other sections describe when they can
  3502. and must be used. Note that not all methods can be used for all
  3503. messages.
  3504. C.1. Query String Serialization
  3505. In order to serialize the parameters using the Query String
  3506. Serialization, the Client constructs the string by adding the
  3507. parameters and values to the query component of a URL using the
  3508. application/x-www-form-urlencoded format as defined by [WHATWG.URL].
  3509. Query String Serialization is typically used in HTTP GET requests.
  3510. C.2. Form-Encoded Serialization
  3511. Parameters and their values are Form Serialized by adding the
  3512. parameter names and values to the entity body of the HTTP request
  3513. using the application/x-www-form-urlencoded format as defined by
  3514. Appendix B. Form Serialization is typically used in HTTP POST
  3515. requests.
  3516. C.3. JSON Serialization
  3517. The parameters are serialized into a JSON [RFC8259] object structure
  3518. by adding each parameter at the highest structure level. Parameter
  3519. names and string values are represented as JSON strings. Numerical
  3520. values are represented as JSON numbers. Boolean values are
  3521. represented as JSON booleans. Omitted parameters and parameters with
  3522. no value SHOULD be omitted from the object and not represented by a
  3523. JSON null value, unless otherwise specified. A parameter MAY have a
  3524. JSON object or a JSON array as its value. The order of parameters
  3525. does not matter and can vary.
  3526. Appendix D. Extensions
  3527. Below is a list of well-established extensions at the time of
  3528. publication:
  3529. * [RFC7009]: Token Revocation
  3530. - The Token Revocation extension defines a mechanism for clients
  3531. to indicate to the authorization server that an access token is
  3532. no longer needed.
  3533. * [RFC7591]: Dynamic Client Registration
  3534. Hardt, et al. Expires 3 September 2026 [Page 92]
  3535. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3536. - Dynamic Client Registration provides a mechanism for
  3537. programmatically registering clients with an authorization
  3538. server.
  3539. * [RFC7662]: Token Introspection
  3540. - The Token Introspection extension defines a mechanism for
  3541. resource servers to obtain information about access tokens.
  3542. * [RFC8414]: Authorization Server Metadata
  3543. - Authorization Server Metadata (also known as OAuth Discovery)
  3544. defines an endpoint clients can use to look up the information
  3545. needed to interact with a particular OAuth server, such as the
  3546. location of the authorization and token endpoints and the
  3547. supported grant types.
  3548. * [RFC8628]: OAuth 2.0 Device Authorization Grant
  3549. - The Device Authorization Grant (formerly known as the Device
  3550. Flow) is an extension that enables devices with no browser or
  3551. limited input capability to obtain an access token. This is
  3552. commonly used by smart TV apps, or devices like hardware video
  3553. encoders that can stream video to a streaming video service.
  3554. * [RFC8705]: Mutual TLS
  3555. - Mutual TLS describes a mechanism of binding tokens to the
  3556. clients they were issued to, as well as a client authentication
  3557. mechanism, via TLS certificate authentication.
  3558. * [RFC8707]: Resource Indicators
  3559. - Provides a way for the client to explicitly signal to the
  3560. authorization server where it intends to use the access token
  3561. it is requesting.
  3562. * [RFC9068]: JSON Web Token (JWT) Profile for OAuth 2.0 Access
  3563. Tokens
  3564. - This specification defines a profile for issuing OAuth access
  3565. tokens in JSON Web Token (JWT) format.
  3566. * [RFC9126]: Pushed Authorization Requests
  3567. Hardt, et al. Expires 3 September 2026 [Page 93]
  3568. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3569. - The Pushed Authorization Requests extension describes a
  3570. technique of initiating an OAuth flow from the back channel,
  3571. providing better security and more flexibility for building
  3572. complex authorization requests.
  3573. * [RFC9207]: Authorization Server Issuer Identification
  3574. - The iss parameter in the authorization response indicates the
  3575. identity of the authorization server to prevent mix-up attacks
  3576. in the client.
  3577. * [RFC9396]: Rich Authorization Requests
  3578. - Rich Authorization Requests specifies a new parameter
  3579. authorization_details that is used to carry fine-grained
  3580. authorization data in the OAuth authorization request.
  3581. * [RFC9449]: Demonstrating Proof of Possession (DPoP)
  3582. - DPoP describes a mechanism for sender-constraining OAuth 2.0
  3583. tokens via a proof-of-possession mechanism on the application
  3584. level.
  3585. * [RFC9470]: Step-Up Authentication Challenge Protocol
  3586. - Step-Up Auth describes a mechanism that resource servers can
  3587. use to signal to a client that the authentication event
  3588. associated with the access token of the current request does
  3589. not meet its authentication requirements.
  3590. Appendix E. Acknowledgements
  3591. This specification is the work of the OAuth Working Group, and its
  3592. starting point was based on the contents of the following
  3593. specifications: OAuth 2.0 Authorization Framework (RFC 6749), OAuth
  3594. 2.0 for Native Apps (RFC 8252), OAuth Security Best Current Practice,
  3595. and OAuth 2.0 for Browser-Based Apps. The editors would like to
  3596. thank everyone involved in the creation of those specifications upon
  3597. which this is built.
  3598. The editors would also like to thank the following individuals for
  3599. their ideas, feedback, corrections, and wording that helped shape
  3600. this version of the specification: Andrii Deinega, Bob Hamburg, Brian
  3601. Campbell, Daniel Fett, Deng Chao, Emelia Smith, Falko, Filip Skokan,
  3602. Joseph Heenan, Justin Richer, Karsten Meyer zu Selhausen, Michael
  3603. Jones, Michael Peck, Roberto Polli, Tim Würtele and Vittorio
  3604. Bertocci.
  3605. Hardt, et al. Expires 3 September 2026 [Page 94]
  3606. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3607. Discussions around this specification have also occurred at the OAuth
  3608. Security Workshop in 2021 and 2022. The authors thank the organizers
  3609. of the workshop (Guido Schmitz, Steinar Noem, and Daniel Fett) for
  3610. hosting an event that's conducive to collaboration and community
  3611. input.
  3612. Appendix F. Document History
  3613. [[ To be removed from the final specification ]]
  3614. -15
  3615. * add additional context for JWT client authentication and
  3616. specifically recommend RFC7523bis
  3617. * editorial clarifications and updates
  3618. * clarify error responses in authorization endpoint and token
  3619. endpoint
  3620. * synced language from RFC9700 for AS open redirect considerations
  3621. * applied RFC6750 erratas 3500 and 6613
  3622. * resolved ambiguity around repeated parameters
  3623. -14
  3624. * Editorial clarifications
  3625. * Corrected an instance of "relying party" vs "resource server"
  3626. * Add references to client_secret_post and client_secret_basic terms
  3627. from RFC7591
  3628. * Replaced "sanitize" language with treating as untrusted input
  3629. * Clarified that native apps guidance applies primarily to mobile
  3630. app platforms
  3631. * Clarify that there is no requirement that an AS supports public or
  3632. confidential clients in particular
  3633. -13
  3634. * Updated references to RFC 9700
  3635. * Updated and sorted list of OAuth extensions
  3636. Hardt, et al. Expires 3 September 2026 [Page 95]
  3637. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3638. * Updated references to link to section numbers
  3639. -12
  3640. * Updated language around client registration to better reflect
  3641. alternative registration methods such as those in use by OpenID
  3642. Federation and open ecosystems
  3643. * Added DPoP and Step-Up Auth to appendix of extensions
  3644. * Updated reference for case insensitivity of auth scheme to HTTP
  3645. instead of ABNF
  3646. * Corrected an instance of "relying party" vs "client"
  3647. * Moved client_id requirement to the individual grant types
  3648. * Consolidated the descriptions of serialization methods to the
  3649. appendix
  3650. -11
  3651. * Explicitly mention that Bearer is case insensitive
  3652. * Recommend against defining custom scopes that conflict with known
  3653. scopes
  3654. * Change client credentials to be required to be supported in the
  3655. request body to avoid HTTP Basic authentication encoding interop
  3656. issues
  3657. -10
  3658. * Clarify that the client id is an opaque string
  3659. * Extensions may define additional error codes on a resource request
  3660. * Improved formatting for error field definitions
  3661. * Moved and expanded "scope" definition to introduction section
  3662. * Split access token section into structure and request
  3663. * Renamed b64token to token68 for consistency with RFC7235
  3664. * Restored content from old appendix B about application/x-www-form-
  3665. urlencoded
  3666. Hardt, et al. Expires 3 September 2026 [Page 96]
  3667. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3668. * Clarified that clients must not parse access tokens
  3669. * Expanded text around when redirect_uri parameter is required in
  3670. the authorization request
  3671. * Changed "permissions" to "privileges" in refresh token section for
  3672. consistency
  3673. * Consolidated authorization code flow security considerations
  3674. * Clarified authorization code reuse - an authorization code can
  3675. only obtain an access token once
  3676. -09
  3677. * AS MUST NOT support CORS requests at authorization endpoint
  3678. * more detail on asymmetric client authentication
  3679. * sync CSRF description from security BCP
  3680. * update and move sender-constrained access tokens section
  3681. * sync client impersonating resource owner with security BCP
  3682. * add reference to authorization request from redirect URI
  3683. registration section
  3684. * sync refresh rotation section from security BCP
  3685. * sync redirect URI matching text from security BCP
  3686. * updated references to RAR (RFC9396)
  3687. * clarifications on URIs
  3688. * removed redirect_uri from the token request
  3689. * expanded security considerations around code_verifier
  3690. * revised introduction section
  3691. -08
  3692. * Updated acknowledgments
  3693. * Swap "by a trusted party" with "by an outside party" in client ID
  3694. definition
  3695. Hardt, et al. Expires 3 September 2026 [Page 97]
  3696. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3697. * Replaced "verify the identity of the resource owner" with
  3698. "authenticate"
  3699. * Clarified refresh token rotation to match RFC6819
  3700. * Added appendix to hold application/x-www-form-urlencoded examples
  3701. * Fixed references to entries in appendix
  3702. * Incorporated new "Phishing via AS" section from Security BCP
  3703. * Rephrase description of the motivation for client authentication
  3704. * Moved "scope" parameter in token request into specific grant types
  3705. to match OAuth 2.0
  3706. * Updated Clickjacking and Open Redirection description from the
  3707. latest version of the Security BCP
  3708. * Moved normative requirements out of authorization code security
  3709. considerations section
  3710. * Security considerations clarifications, and removed a duplicate
  3711. section
  3712. -07
  3713. * Removed "third party" from abstract
  3714. * Added MFA and passwordless as additional motiviations in
  3715. introduction
  3716. * Mention PAR as one way redirect URI registration can happen
  3717. * Added a reference to requiring CORS headers on the token endpoint
  3718. * Updated reference to OMAP extension
  3719. * Fixed numbering in sequence diagram
  3720. -06
  3721. * Removed "credentialed client" term
  3722. * Simplified definition of "confidential" and "public" clients
  3723. * Incorporated the iss response parameter referencing RFC9207
  3724. Hardt, et al. Expires 3 September 2026 [Page 98]
  3725. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3726. * Added section on access token validation by the RS
  3727. * Removed requirement for authorization servers to support all 3
  3728. redirect methods for native apps
  3729. * Fixes for some references
  3730. * Updates HTTP references to RFC 9110
  3731. * Clarifies "authorization grant" term
  3732. * Clarifies client credential grant usage
  3733. * Clean up authorization code diagram
  3734. * Updated reference for application/x-www-form-urlencoded and
  3735. removed outdated note about it not being in the IANA registry
  3736. -05
  3737. * Added a section about the removal of the implicit flow
  3738. * Moved many normative requirements from security considerations
  3739. into the appropriate inline sections
  3740. * Reorganized and consolidated TLS language
  3741. * Require TLS on redirect URIs except for localhost/custom URL
  3742. scheme
  3743. * Updated refresh token guidance to match security BCP
  3744. -04
  3745. * Added explicit mention of not sending access tokens in URI query
  3746. strings
  3747. * Clarifications on definition of client types
  3748. * Consolidated text around loopback vs localhost
  3749. * Editorial clarifications throughout the document
  3750. -03
  3751. * refactoring to collect all the grant types under the same top-
  3752. level header in section 4
  3753. Hardt, et al. Expires 3 September 2026 [Page 99]
  3754. Internet-Draft The OAuth 2.1 Authorization Framework March 2026
  3755. * Better split normative and security consideration text into the
  3756. appropriate places, both moving text that was really security
  3757. considerations out of the main part of the document, as well as
  3758. pulling normative requirements from the security considerations
  3759. sections into the appropriate part of the main document
  3760. * Incorporated many of the published errata on RFC6749
  3761. * Updated references to various RFCs
  3762. * Editorial clarifications throughout the document
  3763. -02
  3764. -01
  3765. -00
  3766. * initial revision
  3767. Authors' Addresses
  3768. Dick Hardt
  3769. Hellō
  3770. Email: dick.hardt@gmail.com
  3771. Aaron Parecki
  3772. Okta
  3773. Email: aaron@parecki.com
  3774. URI: https://aaronparecki.com
  3775. Torsten Lodderstedt
  3776. SPRIND
  3777. Email: torsten@lodderstedt.net
  3778. Hardt, et al. Expires 3 September 2026 [Page 100]