mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-23 14:57:51 +00:00
Fix oauth2 auth and UI (#33961)
This commit is contained in:
parent
0da7318cf3
commit
279473f467
@ -249,7 +249,7 @@ func AuthorizeOAuth(ctx *context.Context) {
|
||||
}, form.RedirectURI)
|
||||
return
|
||||
}
|
||||
if err := ctx.Session.Set("CodeChallengeMethod", form.CodeChallenge); err != nil {
|
||||
if err := ctx.Session.Set("CodeChallenge", form.CodeChallenge); err != nil {
|
||||
handleAuthorizeError(ctx, AuthorizeError{
|
||||
ErrorCode: ErrorCodeServerError,
|
||||
ErrorDescription: "cannot set code challenge",
|
||||
|
@ -1,7 +1,6 @@
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content ui one column stackable tw-text-center page grid oauth2-authorize-application-box">
|
||||
<div class="column seven wide">
|
||||
<div class="ui middle centered raised segments">
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content oauth2-authorize-application-box">
|
||||
<div class="ui container tw-max-w-[500px]">
|
||||
<h3 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "auth.authorize_title" .Application.Name}}
|
||||
</h3>
|
||||
@ -18,7 +17,7 @@
|
||||
<div class="ui attached segment">
|
||||
<p>{{ctx.Locale.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML}}</p>
|
||||
</div>
|
||||
<div class="ui attached segment">
|
||||
<div class="ui attached segment tw-text-center">
|
||||
<form method="post" action="{{AppSubUrl}}/login/oauth/grant">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="client_id" value="{{.Application.ClientID}}">
|
||||
@ -31,6 +30,5 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{{template "base/head" .}}
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content ui one column stackable tw-text-center page grid oauth2-authorize-application-box {{if .IsRepo}}repository{{end}}">
|
||||
{{if .IsRepo}}{{template "repo/header" .}}{{end}}
|
||||
<div class="column seven wide">
|
||||
<div class="ui middle centered raised segments">
|
||||
<div role="main" aria-label="{{.Title}}" class="page-content oauth2-authorize-application-box">
|
||||
<div class="ui container tw-max-w-[500px]">
|
||||
<h1 class="ui top attached header">
|
||||
{{ctx.Locale.Tr "auth.authorization_failed"}}
|
||||
</h1>
|
||||
@ -11,6 +9,5 @@
|
||||
<p>{{ctx.Locale.Tr "auth.authorization_failed_desc"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
Loading…
Reference in New Issue
Block a user