An experimental IndieWeb site built in Go.

add auth page styles

+89 -56
+41 -22
html/pages/auth.templ
··· 6 ) 7 8 templ Auth( req *indieauth.AuthenticationRequest, app *indieauth.ApplicationMetadata, nonceId string, nonce string ) { 9 - <h1>IndieAuth Server Demo: Authorization</h1> 10 - 11 - <p> 12 - You received an authorization request from 13 14 if app != nil { 15 - if len(app.Logo) > 0 { 16 - <img style="width: 1em; vertical-align: middle" src={ app.Logo } /> 17 - } 18 19 - <strong>{ app.Name }</strong> by { app.Author }: 20 } else { 21 - the following client: 22 } 23 - </p> 24 25 - <ul> 26 - <li><strong>Redirect:</strong> <code>{ req.ClientID }</code></li> 27 - <li><strong>Client:</strong> <code>{ req.RedirectURI }</code></li> 28 - </ul> 29 30 - <p>For the following scopes: 31 - for _, scope := range req.Scopes { 32 - <code>{ scope }</code> 33 - } 34 - .</p> 35 36 <form method='post' action='/authorization/accept'> 37 <input type="hidden" name="response_type" value="code"/> ··· 46 <input type="hidden" name="nonce_id" value={ nonceId }/> 47 <input type="hidden" name="nonce" value={ nonce }/> 48 49 - <p>In a production server, this page could be behind some sort of authentication mechanism, such as username and password, PassKey, etc.</p> 50 - 51 - <button id="submit">Authorize</button> 52 </form> 53 }
··· 6 ) 7 8 templ Auth( req *indieauth.AuthenticationRequest, app *indieauth.ApplicationMetadata, nonceId string, nonce string ) { 9 + <div class="px-4 py-12 md:py-20 mx-auto max-w-screen-sm"> 10 + <p class="text-sm font-thin italic">authorize access to</p> 11 + <h1 class="mb-8 text-3xl font-extrabold">puregarlic dot space</h1> 12 13 + <div class="pt-6 border border-highlightMed rounded bg-surface"> 14 if app != nil { 15 + <div class="px-6 flex gap-6 items-center"> 16 + if len(app.Logo) > 0 { 17 + <img class="max-w-12" src={ app.Logo } /> 18 + } 19 20 + <div> 21 + <h2 class="font-bold text-lg">{ app.Name }</h2> 22 + 23 + if len(app.Author) > 0 { 24 + <p class="text-sm font-light">by {app.Author}</p> 25 + } 26 + </div> 27 + </div> 28 } else { 29 + <h2 class="px-6 font-bold text-subtle">unidentified client</h2> 30 } 31 32 + <div class="mt-6 grid md:grid-cols-[max-content_1fr] *:border-highlightMed"> 33 + <h3 class="px-6 pt-4 pb-2 md:py-4 border-t bg-overlay md:border-r text-subtle font-bold">Client ID</h3> 34 + <p class="px-6 pb-4 pt-1 md:py-4 md:border-t bg-overlay min-w-0 overflow-x-scroll">{ req.ClientID }</p> 35 + 36 + <h3 class="px-6 pt-4 pb-2 md:py-4 border-t md:border-b md:border-r text-subtle font-bold">Redirect URL</h3> 37 + <p class="px-6 pb-4 pt-1 md:py-4 md:border-y min-w-0 overflow-x-scroll">{ req.RedirectURI}</p> 38 39 + <h3 class="px-6 pt-4 pb-2 md:py-4 border-t bg-overlay md:border-r text-subtle font-bold">Scopes</h3> 40 + <ul class="px-6 pb-4 pt-1 md:py-4 bg-overlay flex flex-wrap gap-3"> 41 + for _, scope := range req.Scopes { 42 + <li class="px-2 py-1 text-sm bg-pine rounded">{ scope }</li> 43 + } 44 + </ul> 45 + </div> 46 + </div> 47 48 <form method='post' action='/authorization/accept'> 49 <input type="hidden" name="response_type" value="code"/> ··· 58 <input type="hidden" name="nonce_id" value={ nonceId }/> 59 <input type="hidden" name="nonce" value={ nonce }/> 60 61 + <button 62 + class="mt-8 px-3 py-2 flex items-center justify-center gap-2 bg-surface border border-highlightMed text-sm font-bold transition rounded hover:bg-foam hover:text-surface" 63 + id="submit" 64 + > 65 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="size-4"> 66 + <path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.15-.043l4.25-5.5Z" clip-rule="evenodd" /> 67 + </svg> 68 + Authorize 69 + </button> 70 </form> 71 + </div> 72 }
+48 -34
html/pages/auth_templ.go
··· 31 templ_7745c5c3_Var1 = templ.NopComponent 32 } 33 ctx = templ.ClearChildren(ctx) 34 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h1>IndieAuth Server Demo: Authorization</h1><p>You received an authorization request from ") 35 if templ_7745c5c3_Err != nil { 36 return templ_7745c5c3_Err 37 } 38 if app != nil { 39 if len(app.Logo) > 0 { 40 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<img style=\"width: 1em; vertical-align: middle\" src=\"") 41 if templ_7745c5c3_Err != nil { 42 return templ_7745c5c3_Err 43 } 44 var templ_7745c5c3_Var2 string 45 templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(app.Logo) 46 if templ_7745c5c3_Err != nil { 47 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 16, Col: 70} 48 } 49 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) 50 if templ_7745c5c3_Err != nil { ··· 55 return templ_7745c5c3_Err 56 } 57 } 58 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(" <strong>") 59 if templ_7745c5c3_Err != nil { 60 return templ_7745c5c3_Err 61 } 62 var templ_7745c5c3_Var3 string 63 templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(app.Name) 64 if templ_7745c5c3_Err != nil { 65 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 19, Col: 24} 66 } 67 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) 68 if templ_7745c5c3_Err != nil { 69 return templ_7745c5c3_Err 70 } 71 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</strong> by ") 72 if templ_7745c5c3_Err != nil { 73 return templ_7745c5c3_Err 74 } 75 - var templ_7745c5c3_Var4 string 76 - templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(app.Author) 77 - if templ_7745c5c3_Err != nil { 78 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 19, Col: 51} 79 - } 80 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) 81 - if templ_7745c5c3_Err != nil { 82 - return templ_7745c5c3_Err 83 } 84 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(":") 85 if templ_7745c5c3_Err != nil { 86 return templ_7745c5c3_Err 87 } 88 } else { 89 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("the following client:") 90 if templ_7745c5c3_Err != nil { 91 return templ_7745c5c3_Err 92 } 93 } 94 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><ul><li><strong>Redirect:</strong> <code>") 95 if templ_7745c5c3_Err != nil { 96 return templ_7745c5c3_Err 97 } 98 var templ_7745c5c3_Var5 string 99 templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(req.ClientID) 100 if templ_7745c5c3_Err != nil { 101 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 26, Col: 55} 102 } 103 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) 104 if templ_7745c5c3_Err != nil { 105 return templ_7745c5c3_Err 106 } 107 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code></li><li><strong>Client:</strong> <code>") 108 if templ_7745c5c3_Err != nil { 109 return templ_7745c5c3_Err 110 } 111 var templ_7745c5c3_Var6 string 112 templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(req.RedirectURI) 113 if templ_7745c5c3_Err != nil { 114 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 27, Col: 56} 115 } 116 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) 117 if templ_7745c5c3_Err != nil { 118 return templ_7745c5c3_Err 119 } 120 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code></li></ul><p>For the following scopes: ") 121 if templ_7745c5c3_Err != nil { 122 return templ_7745c5c3_Err 123 } 124 for _, scope := range req.Scopes { 125 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<code>") 126 if templ_7745c5c3_Err != nil { 127 return templ_7745c5c3_Err 128 } 129 var templ_7745c5c3_Var7 string 130 templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(scope) 131 if templ_7745c5c3_Err != nil { 132 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 32, Col: 19} 133 } 134 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) 135 if templ_7745c5c3_Err != nil { 136 return templ_7745c5c3_Err 137 } 138 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</code> ") 139 if templ_7745c5c3_Err != nil { 140 return templ_7745c5c3_Err 141 } 142 } 143 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(".</p><form method=\"post\" action=\"/authorization/accept\"><input type=\"hidden\" name=\"response_type\" value=\"code\"> <input type=\"hidden\" name=\"scope\" value=\"") 144 if templ_7745c5c3_Err != nil { 145 return templ_7745c5c3_Err 146 } 147 var templ_7745c5c3_Var8 string 148 templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(req.Scopes, " ")) 149 if templ_7745c5c3_Err != nil { 150 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 38, Col: 75} 151 } 152 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) 153 if templ_7745c5c3_Err != nil { ··· 160 var templ_7745c5c3_Var9 string 161 templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(req.RedirectURI) 162 if templ_7745c5c3_Err != nil { 163 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 39, Col: 68} 164 } 165 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) 166 if templ_7745c5c3_Err != nil { ··· 173 var templ_7745c5c3_Var10 string 174 templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(req.ClientID) 175 if templ_7745c5c3_Err != nil { 176 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 40, Col: 62} 177 } 178 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) 179 if templ_7745c5c3_Err != nil { ··· 186 var templ_7745c5c3_Var11 string 187 templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(req.State) 188 if templ_7745c5c3_Err != nil { 189 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 41, Col: 55} 190 } 191 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) 192 if templ_7745c5c3_Err != nil { ··· 199 var templ_7745c5c3_Var12 string 200 templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(req.CodeChallenge) 201 if templ_7745c5c3_Err != nil { 202 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 42, Col: 72} 203 } 204 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) 205 if templ_7745c5c3_Err != nil { ··· 212 var templ_7745c5c3_Var13 string 213 templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(req.CodeChallengeMethod) 214 if templ_7745c5c3_Err != nil { 215 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 43, Col: 85} 216 } 217 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) 218 if templ_7745c5c3_Err != nil { ··· 225 var templ_7745c5c3_Var14 string 226 templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(nonceId) 227 if templ_7745c5c3_Err != nil { 228 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 46, Col: 56} 229 } 230 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) 231 if templ_7745c5c3_Err != nil { ··· 238 var templ_7745c5c3_Var15 string 239 templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(nonce) 240 if templ_7745c5c3_Err != nil { 241 - return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 47, Col: 51} 242 } 243 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) 244 if templ_7745c5c3_Err != nil { 245 return templ_7745c5c3_Err 246 } 247 - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"><p>In a production server, this page could be behind some sort of authentication mechanism, such as username and password, PassKey, etc.</p><button id=\"submit\">Authorize</button></form>") 248 if templ_7745c5c3_Err != nil { 249 return templ_7745c5c3_Err 250 }
··· 31 templ_7745c5c3_Var1 = templ.NopComponent 32 } 33 ctx = templ.ClearChildren(ctx) 34 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"px-4 py-12 md:py-20 mx-auto max-w-screen-sm\"><p class=\"text-sm font-thin italic\">authorize access to</p><h1 class=\"mb-8 text-3xl font-extrabold\">puregarlic dot space</h1><div class=\"pt-6 border border-highlightMed rounded bg-surface\">") 35 if templ_7745c5c3_Err != nil { 36 return templ_7745c5c3_Err 37 } 38 if app != nil { 39 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"px-6 flex gap-6 items-center\">") 40 + if templ_7745c5c3_Err != nil { 41 + return templ_7745c5c3_Err 42 + } 43 if len(app.Logo) > 0 { 44 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<img class=\"max-w-12\" src=\"") 45 if templ_7745c5c3_Err != nil { 46 return templ_7745c5c3_Err 47 } 48 var templ_7745c5c3_Var2 string 49 templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(app.Logo) 50 if templ_7745c5c3_Err != nil { 51 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 17, Col: 46} 52 } 53 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) 54 if templ_7745c5c3_Err != nil { ··· 59 return templ_7745c5c3_Err 60 } 61 } 62 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div><h2 class=\"font-bold text-lg\">") 63 if templ_7745c5c3_Err != nil { 64 return templ_7745c5c3_Err 65 } 66 var templ_7745c5c3_Var3 string 67 templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(app.Name) 68 if templ_7745c5c3_Err != nil { 69 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 21, Col: 49} 70 } 71 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) 72 if templ_7745c5c3_Err != nil { 73 return templ_7745c5c3_Err 74 } 75 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</h2>") 76 if templ_7745c5c3_Err != nil { 77 return templ_7745c5c3_Err 78 } 79 + if len(app.Author) > 0 { 80 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<p class=\"text-sm font-light\">by ") 81 + if templ_7745c5c3_Err != nil { 82 + return templ_7745c5c3_Err 83 + } 84 + var templ_7745c5c3_Var4 string 85 + templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(app.Author) 86 + if templ_7745c5c3_Err != nil { 87 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 24, Col: 56} 88 + } 89 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) 90 + if templ_7745c5c3_Err != nil { 91 + return templ_7745c5c3_Err 92 + } 93 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p>") 94 + if templ_7745c5c3_Err != nil { 95 + return templ_7745c5c3_Err 96 + } 97 } 98 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div></div>") 99 if templ_7745c5c3_Err != nil { 100 return templ_7745c5c3_Err 101 } 102 } else { 103 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<h2 class=\"px-6 font-bold text-subtle\">unidentified client</h2>") 104 if templ_7745c5c3_Err != nil { 105 return templ_7745c5c3_Err 106 } 107 } 108 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"mt-6 grid md:grid-cols-[max-content_1fr] *:border-highlightMed\"><h3 class=\"px-6 pt-4 pb-2 md:py-4 border-t bg-overlay md:border-r text-subtle font-bold\">Client ID</h3><p class=\"px-6 pb-4 pt-1 md:py-4 md:border-t bg-overlay min-w-0 overflow-x-scroll\">") 109 if templ_7745c5c3_Err != nil { 110 return templ_7745c5c3_Err 111 } 112 var templ_7745c5c3_Var5 string 113 templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(req.ClientID) 114 if templ_7745c5c3_Err != nil { 115 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 34, Col: 103} 116 } 117 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) 118 if templ_7745c5c3_Err != nil { 119 return templ_7745c5c3_Err 120 } 121 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><h3 class=\"px-6 pt-4 pb-2 md:py-4 border-t md:border-b md:border-r text-subtle font-bold\">Redirect URL</h3><p class=\"px-6 pb-4 pt-1 md:py-4 md:border-y min-w-0 overflow-x-scroll\">") 122 if templ_7745c5c3_Err != nil { 123 return templ_7745c5c3_Err 124 } 125 var templ_7745c5c3_Var6 string 126 templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(req.RedirectURI) 127 if templ_7745c5c3_Err != nil { 128 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 37, Col: 95} 129 } 130 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6)) 131 if templ_7745c5c3_Err != nil { 132 return templ_7745c5c3_Err 133 } 134 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</p><h3 class=\"px-6 pt-4 pb-2 md:py-4 border-t bg-overlay md:border-r text-subtle font-bold\">Scopes</h3><ul class=\"px-6 pb-4 pt-1 md:py-4 bg-overlay flex flex-wrap gap-3\">") 135 if templ_7745c5c3_Err != nil { 136 return templ_7745c5c3_Err 137 } 138 for _, scope := range req.Scopes { 139 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li class=\"px-2 py-1 text-sm bg-pine rounded\">") 140 if templ_7745c5c3_Err != nil { 141 return templ_7745c5c3_Err 142 } 143 var templ_7745c5c3_Var7 string 144 templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(scope) 145 if templ_7745c5c3_Err != nil { 146 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 42, Col: 63} 147 } 148 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) 149 if templ_7745c5c3_Err != nil { 150 return templ_7745c5c3_Err 151 } 152 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</li>") 153 if templ_7745c5c3_Err != nil { 154 return templ_7745c5c3_Err 155 } 156 } 157 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ul></div></div><form method=\"post\" action=\"/authorization/accept\"><input type=\"hidden\" name=\"response_type\" value=\"code\"> <input type=\"hidden\" name=\"scope\" value=\"") 158 if templ_7745c5c3_Err != nil { 159 return templ_7745c5c3_Err 160 } 161 var templ_7745c5c3_Var8 string 162 templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(strings.Join(req.Scopes, " ")) 163 if templ_7745c5c3_Err != nil { 164 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 50, Col: 75} 165 } 166 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) 167 if templ_7745c5c3_Err != nil { ··· 174 var templ_7745c5c3_Var9 string 175 templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(req.RedirectURI) 176 if templ_7745c5c3_Err != nil { 177 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 51, Col: 68} 178 } 179 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) 180 if templ_7745c5c3_Err != nil { ··· 187 var templ_7745c5c3_Var10 string 188 templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(req.ClientID) 189 if templ_7745c5c3_Err != nil { 190 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 52, Col: 62} 191 } 192 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) 193 if templ_7745c5c3_Err != nil { ··· 200 var templ_7745c5c3_Var11 string 201 templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(req.State) 202 if templ_7745c5c3_Err != nil { 203 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 53, Col: 55} 204 } 205 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11)) 206 if templ_7745c5c3_Err != nil { ··· 213 var templ_7745c5c3_Var12 string 214 templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(req.CodeChallenge) 215 if templ_7745c5c3_Err != nil { 216 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 54, Col: 72} 217 } 218 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) 219 if templ_7745c5c3_Err != nil { ··· 226 var templ_7745c5c3_Var13 string 227 templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(req.CodeChallengeMethod) 228 if templ_7745c5c3_Err != nil { 229 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 55, Col: 85} 230 } 231 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) 232 if templ_7745c5c3_Err != nil { ··· 239 var templ_7745c5c3_Var14 string 240 templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(nonceId) 241 if templ_7745c5c3_Err != nil { 242 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 58, Col: 56} 243 } 244 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) 245 if templ_7745c5c3_Err != nil { ··· 252 var templ_7745c5c3_Var15 string 253 templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(nonce) 254 if templ_7745c5c3_Err != nil { 255 + return templ.Error{Err: templ_7745c5c3_Err, FileName: `html/pages/auth.templ`, Line: 59, Col: 51} 256 } 257 _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15)) 258 if templ_7745c5c3_Err != nil { 259 return templ_7745c5c3_Err 260 } 261 + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\"> <button class=\"mt-8 px-3 py-2 flex items-center justify-center gap-2 bg-surface border border-highlightMed text-sm font-bold transition rounded hover:bg-foam hover:text-surface\" id=\"submit\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" fill=\"currentColor\" class=\"size-4\"><path fill-rule=\"evenodd\" d=\"M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.15-.043l4.25-5.5Z\" clip-rule=\"evenodd\"></path></svg> Authorize</button></form></div>") 262 if templ_7745c5c3_Err != nil { 263 return templ_7745c5c3_Err 264 }