[{"data":1,"prerenderedAt":1255},["ShallowReactive",2],{"navigation_docs":3,"-gotrue-admin-client":182,"-gotrue-admin-client-surround":1250},[4,31,72,103,134,150,171],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":30},"Getting Started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,15,20,25],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start","i-lucide-play",{"title":26,"path":27,"stem":28,"icon":29},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F4.agent-skill","i-lucide-sparkles",false,{"title":32,"icon":33,"path":34,"stem":35,"children":36,"page":30},"Core","i-lucide-box","\u002Fcore","2.core",[37,42,47,52,57,62,67],{"title":38,"path":39,"stem":40,"icon":41},"Routing","\u002Fcore\u002Frouting","2.core\u002F1.routing","i-lucide-route",{"title":43,"path":44,"stem":45,"icon":46},"Handlers","\u002Fcore\u002Fhandlers","2.core\u002F2.handlers","i-lucide-braces",{"title":48,"path":49,"stem":50,"icon":51},"Request Binding","\u002Fcore\u002Frequest-binding","2.core\u002F3.request-binding","i-lucide-tags",{"title":53,"path":54,"stem":55,"icon":56},"Validation","\u002Fcore\u002Fvalidation","2.core\u002F4.validation","i-lucide-check-check",{"title":58,"path":59,"stem":60,"icon":61},"Context","\u002Fcore\u002Fcontext","2.core\u002F5.context","i-lucide-file-input",{"title":63,"path":64,"stem":65,"icon":66},"Errors","\u002Fcore\u002Ferrors","2.core\u002F6.errors","i-lucide-triangle-alert",{"title":68,"path":69,"stem":70,"icon":71},"Middleware","\u002Fcore\u002Fmiddleware","2.core\u002F7.middleware","i-lucide-layers",{"title":73,"icon":74,"path":75,"stem":76,"children":77,"page":30},"Auth","i-lucide-shield-check","\u002Fauth","3.auth",[78,83,88,93,98],{"title":79,"path":80,"stem":81,"icon":82},"Overview","\u002Fauth\u002Foverview","3.auth\u002F1.overview","i-lucide-shield",{"title":84,"path":85,"stem":86,"icon":87},"Auth Rules","\u002Fauth\u002Fauth-rules","3.auth\u002F2.auth-rules","i-lucide-lock",{"title":89,"path":90,"stem":91,"icon":92},"JWT Providers","\u002Fauth\u002Fjwt-providers","3.auth\u002F3.jwt-providers","i-lucide-key",{"title":94,"path":95,"stem":96,"icon":97},"Roles & Permissions","\u002Fauth\u002Froles-and-permissions","3.auth\u002F4.roles-and-permissions","i-lucide-users",{"title":99,"path":100,"stem":101,"icon":102},"Audit Logging","\u002Fauth\u002Faudit-logging","3.auth\u002F5.audit-logging","i-lucide-scroll-text",{"title":104,"icon":105,"path":106,"stem":107,"children":108,"page":30},"GoTrue","i-lucide-key-round","\u002Fgotrue","4.gotrue",[109,114,119,124,129],{"title":110,"path":111,"stem":112,"icon":113},"Proxy","\u002Fgotrue\u002Fproxy","4.gotrue\u002F1.proxy","i-lucide-shuffle",{"title":115,"path":116,"stem":117,"icon":118},"Endpoints","\u002Fgotrue\u002Fendpoints","4.gotrue\u002F2.endpoints","i-lucide-list",{"title":120,"path":121,"stem":122,"icon":123},"Client IP & Rate Limits","\u002Fgotrue\u002Fclient-ip-and-rate-limits","4.gotrue\u002F3.client-ip-and-rate-limits","i-lucide-network",{"title":125,"path":126,"stem":127,"icon":128},"Deployment","\u002Fgotrue\u002Fdeployment","4.gotrue\u002F4.deployment","i-lucide-server",{"title":130,"path":131,"stem":132,"icon":133},"Admin Client","\u002Fgotrue\u002Fadmin-client","4.gotrue\u002F5.admin-client","i-lucide-shield-user",{"title":135,"icon":136,"path":137,"stem":138,"children":139,"page":30},"API Docs","i-lucide-file-text","\u002Fapi-docs","5.api-docs",[140,145],{"title":141,"path":142,"stem":143,"icon":144},"OpenAPI","\u002Fapi-docs\u002Fopenapi","5.api-docs\u002F1.openapi","i-lucide-file-json",{"title":146,"path":147,"stem":148,"icon":149},"Scalar UI","\u002Fapi-docs\u002Fscalar","5.api-docs\u002F2.scalar","i-lucide-book-open-text",{"title":151,"icon":152,"path":153,"stem":154,"children":155,"page":30},"Guides","i-lucide-compass","\u002Fguides","6.guides",[156,161,166],{"title":157,"path":158,"stem":159,"icon":160},"Testing","\u002Fguides\u002Ftesting","6.guides\u002F1.testing","i-lucide-flask-conical",{"title":162,"path":163,"stem":164,"icon":165},"Performance","\u002Fguides\u002Fperformance","6.guides\u002F2.performance","i-lucide-gauge",{"title":167,"path":168,"stem":169,"icon":170},"Releasing","\u002Fguides\u002Freleasing","6.guides\u002F3.releasing","i-lucide-tag",{"title":172,"icon":173,"path":174,"stem":175,"children":176,"page":30},"Reference","i-lucide-code","\u002Freference","7.reference",[177],{"title":178,"path":179,"stem":180,"icon":181},"API Reference","\u002Freference\u002Fapi-reference","7.reference\u002F1.api-reference","i-lucide-list-tree",{"id":183,"title":130,"body":184,"description":1243,"extension":1244,"links":1245,"meta":1246,"navigation":1247,"path":131,"seo":1248,"stem":132,"__hash__":1249},"docs\u002F4.gotrue\u002F5.admin-client.md",{"type":185,"value":186,"toc":1233},"minimark",[187,195,204,209,353,383,386,391,405,427,431,586,589,624,641,645,648,742,772,779,791,795,1016,1026,1041,1063,1072,1075,1093,1196,1213,1217,1229],[188,189,190,194],"p",{},[191,192,193],"code",{},"auth\u002Fgotrueadmin"," calls the GoTrue endpoints that require a service-role token: inviting users, generating action links, and reading, updating, or deleting users. It is a client, not a proxy. It registers no routes, has no HTTP handlers, and there is nothing to mount.",[196,197,198,199,203],"warning",{},"Everything here is privileged. The client signs its own admin token, which can read and change any account, so it must only ever be constructed in server code and pointed at GoTrue's internal URL. Do not wire these calls into a public route, and do not add them to the ",[200,201,202],"a",{"href":111},"proxy"," allowlist: the proxy's endpoints are the ones safe to expose to a browser, and this is the opposite of that. Put your own authorization in front of anything that reaches it.",[205,206,208],"h2",{"id":207},"construct-it","Construct it",[210,211,216],"pre",{"className":212,"code":213,"language":214,"meta":215,"style":215},"language-go shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import \"github.com\u002Fsulv-io\u002Fezz\u002Fauth\u002Fgotrueadmin\"\n\nadmin, err := gotrueadmin.New(gotrueadmin.Config{\n    BaseURL:   os.Getenv(\"GOTRUE_INTERNAL_URL\"), \u002F\u002F http:\u002F\u002Fgotrue:9999\n    JWTSecret: os.Getenv(\"GOTRUE_JWT_SECRET\"),\n})\n","go","",[191,217,218,238,245,285,320,347],{"__ignoreMap":215},[219,220,223,227,231,235],"span",{"class":221,"line":222},"line",1,[219,224,226],{"class":225},"s7zQu","import",[219,228,230],{"class":229},"sMK4o"," \"",[219,232,234],{"class":233},"sBMFI","github.com\u002Fsulv-io\u002Fezz\u002Fauth\u002Fgotrueadmin",[219,236,237],{"class":229},"\"\n",[219,239,241],{"class":221,"line":240},2,[219,242,244],{"emptyLinePlaceholder":243},true,"\n",[219,246,248,252,255,258,261,264,267,271,274,277,279,282],{"class":221,"line":247},3,[219,249,251],{"class":250},"sTEyZ","admin",[219,253,254],{"class":229},",",[219,256,257],{"class":250}," err ",[219,259,260],{"class":229},":=",[219,262,263],{"class":250}," gotrueadmin",[219,265,266],{"class":229},".",[219,268,270],{"class":269},"s2Zo4","New",[219,272,273],{"class":229},"(",[219,275,276],{"class":233},"gotrueadmin",[219,278,266],{"class":229},[219,280,281],{"class":233},"Config",[219,283,284],{"class":229},"{\n",[219,286,288,291,294,297,299,302,304,307,311,313,316],{"class":221,"line":287},4,[219,289,290],{"class":250},"    BaseURL",[219,292,293],{"class":229},":",[219,295,296],{"class":250},"   os",[219,298,266],{"class":229},[219,300,301],{"class":269},"Getenv",[219,303,273],{"class":229},[219,305,306],{"class":229},"\"",[219,308,310],{"class":309},"sfazB","GOTRUE_INTERNAL_URL",[219,312,306],{"class":229},[219,314,315],{"class":229},"),",[219,317,319],{"class":318},"sHwdD"," \u002F\u002F http:\u002F\u002Fgotrue:9999\n",[219,321,323,326,328,331,333,335,337,339,342,344],{"class":221,"line":322},5,[219,324,325],{"class":250},"    JWTSecret",[219,327,293],{"class":229},[219,329,330],{"class":250}," os",[219,332,266],{"class":229},[219,334,301],{"class":269},[219,336,273],{"class":229},[219,338,306],{"class":229},[219,340,341],{"class":309},"GOTRUE_JWT_SECRET",[219,343,306],{"class":229},[219,345,346],{"class":229},"),\n",[219,348,350],{"class":221,"line":349},6,[219,351,352],{"class":229},"})\n",[188,354,355,358,359,362,363,366,367,370,371,374,375,378,379,382],{},[191,356,357],{},"BaseURL"," and ",[191,360,361],{},"JWTSecret"," are required and validated, so a typo fails at construction rather than on the first invite. ",[191,364,365],{},"HTTP"," overrides the client, ",[191,368,369],{},"TokenTTL"," the token lifetime (60 seconds by default), and ",[191,372,373],{},"Role"," the role claim (",[191,376,377],{},"service_role"," by default, which matches GoTrue's ",[191,380,381],{},"GOTRUE_JWT_ADMIN_ROLES",").",[188,384,385],{},"The secret is passed in rather than read from the environment, so the client is configured the same way as everything else in your service.",[387,388,390],"h3",{"id":389},"the-token","The token",[188,392,393,394,397,398,358,401,404],{},"Each call mints a fresh short-lived HS256 token with a top-level ",[191,395,396],{},"role"," claim, plus ",[191,399,400],{},"iat",[191,402,403],{},"exp",". It is sent as a bearer token, never logged, and never included in an error message.",[406,407,408,411,412,415,416,420,421,423,424,426],"note",{},[191,409,410],{},"auth.HMACProvider"," cannot mint this token. Its custom claims are nested under ",[191,413,414],{},"custom",", while GoTrue matches a ",[417,418,419],"strong",{},"top-level"," ",[191,422,396],{}," claim against ",[191,425,381],{},". That is why this package signs its own, rather than reusing the provider.",[205,428,430],{"id":429},"invite-a-user","Invite a user",[210,432,434],{"className":212,"code":433,"language":214,"meta":215,"style":215},"user, err := admin.Invite(ctx, \"ada@example.com\", gotrueadmin.InviteOptions{\n    Data:       map[string]any{\"role\": \"merchant\"},\n    RedirectTo: \"https:\u002F\u002Fapp.example.com\u002Faccept\",\n})\nif errors.Is(err, gotrueadmin.ErrAlreadyRegistered) {\n    \u002F\u002F the address already has a confirmed account\n}\n",[191,435,436,480,521,538,542,575,580],{"__ignoreMap":215},[219,437,438,441,443,445,447,450,452,455,457,460,462,464,467,469,471,473,475,478],{"class":221,"line":222},[219,439,440],{"class":250},"user",[219,442,254],{"class":229},[219,444,257],{"class":250},[219,446,260],{"class":229},[219,448,449],{"class":250}," admin",[219,451,266],{"class":229},[219,453,454],{"class":269},"Invite",[219,456,273],{"class":229},[219,458,459],{"class":250},"ctx",[219,461,254],{"class":229},[219,463,230],{"class":229},[219,465,466],{"class":309},"ada@example.com",[219,468,306],{"class":229},[219,470,254],{"class":229},[219,472,263],{"class":233},[219,474,266],{"class":229},[219,476,477],{"class":233},"InviteOptions",[219,479,284],{"class":229},[219,481,482,485,487,490,494,497,500,503,505,507,509,511,513,516,518],{"class":221,"line":240},[219,483,484],{"class":250},"    Data",[219,486,293],{"class":229},[219,488,489],{"class":229},"       map[",[219,491,493],{"class":492},"spNyl","string",[219,495,496],{"class":229},"]",[219,498,499],{"class":233},"any",[219,501,502],{"class":229},"{",[219,504,306],{"class":229},[219,506,396],{"class":309},[219,508,306],{"class":229},[219,510,293],{"class":229},[219,512,230],{"class":229},[219,514,515],{"class":309},"merchant",[219,517,306],{"class":229},[219,519,520],{"class":229},"},\n",[219,522,523,526,528,530,533,535],{"class":221,"line":247},[219,524,525],{"class":250},"    RedirectTo",[219,527,293],{"class":229},[219,529,230],{"class":229},[219,531,532],{"class":309},"https:\u002F\u002Fapp.example.com\u002Faccept",[219,534,306],{"class":229},[219,536,537],{"class":229},",\n",[219,539,540],{"class":221,"line":287},[219,541,352],{"class":229},[219,543,544,547,550,552,555,557,560,562,564,566,569,572],{"class":221,"line":322},[219,545,546],{"class":225},"if",[219,548,549],{"class":250}," errors",[219,551,266],{"class":229},[219,553,554],{"class":269},"Is",[219,556,273],{"class":229},[219,558,559],{"class":250},"err",[219,561,254],{"class":229},[219,563,263],{"class":250},[219,565,266],{"class":229},[219,567,568],{"class":250},"ErrAlreadyRegistered",[219,570,571],{"class":229},")",[219,573,574],{"class":229}," {\n",[219,576,577],{"class":221,"line":349},[219,578,579],{"class":318},"    \u002F\u002F the address already has a confirmed account\n",[219,581,583],{"class":221,"line":582},7,[219,584,585],{"class":229},"}\n",[188,587,588],{},"GoTrue creates the user if absent and emails the invitation. Three behaviours are worth knowing:",[590,591,592,606,612],"ul",{},[593,594,595,420,598,601,602,605],"li",{},[417,596,597],{},"Invites work with signups disabled.",[191,599,600],{},"GOTRUE_DISABLE_SIGNUP=true"," gates the public ",[191,603,604],{},"\u002Fsignup"," endpoint only. Invite is a separate gate, which is what makes invite-only launches possible.",[593,607,608,611],{},[417,609,610],{},"Re-inviting a pending address succeeds."," It sends a fresh token and creates no duplicate user.",[593,613,614,617,618,621,622,266],{},[417,615,616],{},"An existing confirmed account is an error",", ",[191,619,620],{},"422 email_exists",", which matches ",[191,623,568],{},[188,625,626,629,630,633,634,358,637,640],{},[191,627,628],{},"RedirectTo"," travels in the ",[417,631,632],{},"query string"," on this endpoint, because GoTrue's invite parameters carry only ",[191,635,636],{},"email",[191,638,639],{},"data",". It must be on GoTrue's allowed redirect list, or GoTrue falls back to its configured site URL.",[205,642,644],{"id":643},"generate-a-link-without-sending-mail","Generate a link without sending mail",[188,646,647],{},"When your own renderer sends the email, ask for the link instead:",[210,649,651],{"className":212,"code":650,"language":214,"meta":215,"style":215},"link, err := admin.GenerateLink(ctx, gotrueadmin.LinkRequest{\n    Type:       gotrueadmin.LinkTypeInvite,\n    Email:      \"ada@example.com\",\n    RedirectTo: \"https:\u002F\u002Fapp.example.com\u002Faccept\",\n})\n\u002F\u002F link.ActionLink, link.EmailOTP, link.HashedToken, link.VerificationType, link.User\n",[191,652,653,686,703,719,733,737],{"__ignoreMap":215},[219,654,655,658,660,662,664,666,668,671,673,675,677,679,681,684],{"class":221,"line":222},[219,656,657],{"class":250},"link",[219,659,254],{"class":229},[219,661,257],{"class":250},[219,663,260],{"class":229},[219,665,449],{"class":250},[219,667,266],{"class":229},[219,669,670],{"class":269},"GenerateLink",[219,672,273],{"class":229},[219,674,459],{"class":250},[219,676,254],{"class":229},[219,678,263],{"class":233},[219,680,266],{"class":229},[219,682,683],{"class":233},"LinkRequest",[219,685,284],{"class":229},[219,687,688,691,693,696,698,701],{"class":221,"line":240},[219,689,690],{"class":250},"    Type",[219,692,293],{"class":229},[219,694,695],{"class":250},"       gotrueadmin",[219,697,266],{"class":229},[219,699,700],{"class":250},"LinkTypeInvite",[219,702,537],{"class":229},[219,704,705,708,710,713,715,717],{"class":221,"line":247},[219,706,707],{"class":250},"    Email",[219,709,293],{"class":229},[219,711,712],{"class":229},"      \"",[219,714,466],{"class":309},[219,716,306],{"class":229},[219,718,537],{"class":229},[219,720,721,723,725,727,729,731],{"class":221,"line":287},[219,722,525],{"class":250},[219,724,293],{"class":229},[219,726,230],{"class":229},[219,728,532],{"class":309},[219,730,306],{"class":229},[219,732,537],{"class":229},[219,734,735],{"class":221,"line":322},[219,736,352],{"class":229},[219,738,739],{"class":221,"line":349},[219,740,741],{"class":318},"\u002F\u002F link.ActionLink, link.EmailOTP, link.HashedToken, link.VerificationType, link.User\n",[188,743,744,745,617,748,617,751,617,754,617,757,760,761,764,765,767,768,771],{},"Types are ",[191,746,747],{},"invite",[191,749,750],{},"magiclink",[191,752,753],{},"recovery",[191,755,756],{},"signup",[191,758,759],{},"email_change_current",", and ",[191,762,763],{},"email_change_new",". Here ",[191,766,628],{}," goes in the ",[417,769,770],{},"body",", not the query string — the two endpoints genuinely differ, and the client sends each where GoTrue reads it.",[773,774,775,778],"caution",{},[191,776,777],{},"ActionLink"," signs in whoever opens it. Treat it as a credential: send it to the address it belongs to, and keep it out of logs and error reports.",[188,780,781,784,785,787,788,790],{},[191,782,783],{},"VerificationType"," is not always the type you asked for. A ",[191,786,750],{}," for an address GoTrue does not know becomes a ",[191,789,756],{},", so read it back rather than assuming.",[205,792,794],{"id":793},"read-update-delete","Read, update, delete",[210,796,798],{"className":212,"code":797,"language":214,"meta":215,"style":215},"user, err := admin.GetUser(ctx, id)\npage, err := admin.ListUsers(ctx, 1, 50) \u002F\u002F page.Users, page.Aud, page.Total\n\nban := \"24h\"                              \u002F\u002F \"none\" lifts a ban\n_, err = admin.UpdateUser(ctx, id, gotrueadmin.UserUpdate{\n    BanDuration: &ban,\n    AppMetadata: map[string]any{\"suspended\": true},\n})\n\nerr = admin.DeleteUser(ctx, id, true)     \u002F\u002F soft delete\n",[191,799,800,829,867,871,888,926,941,974,979,984],{"__ignoreMap":215},[219,801,802,804,806,808,810,812,814,817,819,821,823,826],{"class":221,"line":222},[219,803,440],{"class":250},[219,805,254],{"class":229},[219,807,257],{"class":250},[219,809,260],{"class":229},[219,811,449],{"class":250},[219,813,266],{"class":229},[219,815,816],{"class":269},"GetUser",[219,818,273],{"class":229},[219,820,459],{"class":250},[219,822,254],{"class":229},[219,824,825],{"class":250}," id",[219,827,828],{"class":229},")\n",[219,830,831,834,836,838,840,842,844,847,849,851,853,857,859,862,864],{"class":221,"line":240},[219,832,833],{"class":250},"page",[219,835,254],{"class":229},[219,837,257],{"class":250},[219,839,260],{"class":229},[219,841,449],{"class":250},[219,843,266],{"class":229},[219,845,846],{"class":269},"ListUsers",[219,848,273],{"class":229},[219,850,459],{"class":250},[219,852,254],{"class":229},[219,854,856],{"class":855},"sbssI"," 1",[219,858,254],{"class":229},[219,860,861],{"class":855}," 50",[219,863,571],{"class":229},[219,865,866],{"class":318}," \u002F\u002F page.Users, page.Aud, page.Total\n",[219,868,869],{"class":221,"line":247},[219,870,244],{"emptyLinePlaceholder":243},[219,872,873,876,878,880,883,885],{"class":221,"line":287},[219,874,875],{"class":250},"ban ",[219,877,260],{"class":229},[219,879,230],{"class":229},[219,881,882],{"class":309},"24h",[219,884,306],{"class":229},[219,886,887],{"class":318},"                              \u002F\u002F \"none\" lifts a ban\n",[219,889,890,893,895,897,900,902,904,907,909,911,913,915,917,919,921,924],{"class":221,"line":322},[219,891,892],{"class":250},"_",[219,894,254],{"class":229},[219,896,257],{"class":250},[219,898,899],{"class":229},"=",[219,901,449],{"class":250},[219,903,266],{"class":229},[219,905,906],{"class":269},"UpdateUser",[219,908,273],{"class":229},[219,910,459],{"class":250},[219,912,254],{"class":229},[219,914,825],{"class":250},[219,916,254],{"class":229},[219,918,263],{"class":233},[219,920,266],{"class":229},[219,922,923],{"class":233},"UserUpdate",[219,925,284],{"class":229},[219,927,928,931,933,936,939],{"class":221,"line":349},[219,929,930],{"class":250},"    BanDuration",[219,932,293],{"class":229},[219,934,935],{"class":229}," &",[219,937,938],{"class":250},"ban",[219,940,537],{"class":229},[219,942,943,946,948,951,953,955,957,959,961,964,966,968,972],{"class":221,"line":582},[219,944,945],{"class":250},"    AppMetadata",[219,947,293],{"class":229},[219,949,950],{"class":229}," map[",[219,952,493],{"class":492},[219,954,496],{"class":229},[219,956,499],{"class":233},[219,958,502],{"class":229},[219,960,306],{"class":229},[219,962,963],{"class":309},"suspended",[219,965,306],{"class":229},[219,967,293],{"class":229},[219,969,971],{"class":970},"sfNiH"," true",[219,973,520],{"class":229},[219,975,977],{"class":221,"line":976},8,[219,978,352],{"class":229},[219,980,982],{"class":221,"line":981},9,[219,983,244],{"emptyLinePlaceholder":243},[219,985,987,990,992,994,996,999,1001,1003,1005,1007,1009,1011,1013],{"class":221,"line":986},10,[219,988,989],{"class":250},"err ",[219,991,899],{"class":229},[219,993,449],{"class":250},[219,995,266],{"class":229},[219,997,998],{"class":269},"DeleteUser",[219,1000,273],{"class":229},[219,1002,459],{"class":250},[219,1004,254],{"class":229},[219,1006,825],{"class":250},[219,1008,254],{"class":229},[219,1010,971],{"class":970},[219,1012,571],{"class":229},[219,1014,1015],{"class":318},"     \u002F\u002F soft delete\n",[188,1017,1018,1019,1021,1022,1025],{},"Only the fields you set on ",[191,1020,923],{}," are sent, so an unset map is left alone rather than cleared. Pointer fields exist for the cases where ",[191,1023,1024],{},"false"," and \"not set\" differ.",[188,1027,1028,1029,1032,1033,1036,1037,1040],{},"Put authorization data in ",[191,1030,1031],{},"AppMetadata",", never ",[191,1034,1035],{},"UserMetadata",": users can change their own ",[191,1038,1039],{},"user_metadata"," through the proxy.",[188,1042,1043,1044,1047,1048,1050,1051,1054,1055,1058,1059,1062],{},"Passing ",[191,1045,1046],{},"0"," for ",[191,1049,833],{}," or ",[191,1052,1053],{},"perPage"," leaves the parameter off and lets GoTrue apply its own default. ",[191,1056,1057],{},"Total"," comes from GoTrue's ",[191,1060,1061],{},"X-Total-Count"," header, and counts every user in the audience rather than the ones on this page.",[188,1064,1065,1067,1068,1071],{},[191,1066,998],{}," with ",[191,1069,1070],{},"soft"," true anonymises the row and keeps it, so references to it survive. A hard delete removes it, which is what an account-deletion request usually means.",[205,1073,63],{"id":1074},"errors",[188,1076,1077,1078,1081,1082,1085,1086,1089,1090,293],{},"Every failed call returns an ",[191,1079,1080],{},"*APIError"," carrying the HTTP ",[191,1083,1084],{},"Status",", GoTrue's ",[191,1087,1088],{},"Code",", and its ",[191,1091,1092],{},"Msg",[210,1094,1096],{"className":212,"code":1095,"language":214,"meta":215,"style":215},"var apiErr *gotrueadmin.APIError\nif errors.As(err, &apiErr) && apiErr.Status == 422 {\n    log.Printf(\"gotrue refused: %s\", apiErr.Code)\n}\n",[191,1097,1098,1116,1159,1192],{"__ignoreMap":215},[219,1099,1100,1103,1106,1109,1111,1113],{"class":221,"line":222},[219,1101,1102],{"class":229},"var",[219,1104,1105],{"class":250}," apiErr ",[219,1107,1108],{"class":229},"*",[219,1110,276],{"class":233},[219,1112,266],{"class":229},[219,1114,1115],{"class":233},"APIError\n",[219,1117,1118,1120,1122,1124,1127,1129,1131,1133,1135,1138,1140,1143,1146,1148,1151,1154,1157],{"class":221,"line":240},[219,1119,546],{"class":225},[219,1121,549],{"class":250},[219,1123,266],{"class":229},[219,1125,1126],{"class":269},"As",[219,1128,273],{"class":229},[219,1130,559],{"class":250},[219,1132,254],{"class":229},[219,1134,935],{"class":229},[219,1136,1137],{"class":250},"apiErr",[219,1139,571],{"class":229},[219,1141,1142],{"class":229}," &&",[219,1144,1145],{"class":250}," apiErr",[219,1147,266],{"class":229},[219,1149,1150],{"class":250},"Status ",[219,1152,1153],{"class":229},"==",[219,1155,1156],{"class":855}," 422",[219,1158,574],{"class":229},[219,1160,1161,1164,1166,1169,1171,1173,1176,1180,1182,1184,1186,1188,1190],{"class":221,"line":247},[219,1162,1163],{"class":250},"    log",[219,1165,266],{"class":229},[219,1167,1168],{"class":269},"Printf",[219,1170,273],{"class":229},[219,1172,306],{"class":229},[219,1174,1175],{"class":309},"gotrue refused: ",[219,1177,1179],{"class":1178},"swJcz","%s",[219,1181,306],{"class":229},[219,1183,254],{"class":229},[219,1185,1145],{"class":250},[219,1187,266],{"class":229},[219,1189,1088],{"class":250},[219,1191,828],{"class":229},[219,1193,1194],{"class":221,"line":287},[219,1195,585],{"class":229},[188,1197,1198,1199,1202,1203,358,1205,1208,1209,1212],{},"Two sentinels are matched with ",[191,1200,1201],{},"errors.Is",": ",[191,1204,568],{},[191,1206,1207],{},"ErrNotFound",". Both key off GoTrue's ",[191,1210,1211],{},"error_code",", not its message text, so a wording change upstream does not break them.",[205,1214,1216],{"id":1215},"next-steps","Next steps",[590,1218,1219,1224],{},[593,1220,1221,1223],{},[200,1222,110],{"href":111}," for the public, browser-facing half.",[593,1225,1226,1228],{},[200,1227,125],{"href":126}," for the GoTrue configuration these calls assume.",[1230,1231,1232],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":215,"searchDepth":240,"depth":240,"links":1234},[1235,1238,1239,1240,1241,1242],{"id":207,"depth":240,"text":208,"children":1236},[1237],{"id":389,"depth":247,"text":390},{"id":429,"depth":240,"text":430},{"id":643,"depth":240,"text":644},{"id":793,"depth":240,"text":794},{"id":1074,"depth":240,"text":63},{"id":1215,"depth":240,"text":1216},"Call GoTrue's privileged admin endpoints from server code — invite users, generate action links, ban and delete accounts.","md",null,{},{"icon":133},{"title":130,"description":1243},"3XXD-HHhxH9sYw2PZy77zwpZA9mORJVlc-rVDUhAFOQ",[1251,1253],{"title":125,"path":126,"stem":127,"description":1252,"icon":128,"children":-1},"Configure GoTrue to sit behind ezz, run it locally with Docker, and refresh the golden fixtures.",{"title":141,"path":142,"stem":143,"description":1254,"icon":144,"children":-1},"Generate an OpenAPI 3 document from your handler types and struct tags.",1790276242640]