Skip to content

Commit

Permalink
Improve used form action
Browse files Browse the repository at this point in the history
  • Loading branch information
giftkugel committed Sep 12, 2024
1 parent 09c2185 commit 7a4fd55
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/server/handler/authorize/authorize.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"github.com/google/uuid"
"github.com/webishdev/stopnik/internal/config"
"github.com/webishdev/stopnik/internal/endpoint"
internalHttp "github.com/webishdev/stopnik/internal/http"
"github.com/webishdev/stopnik/internal/manager/cookie"
"github.com/webishdev/stopnik/internal/manager/session"
Expand Down Expand Up @@ -322,7 +323,8 @@ func (h *Handler) sendLogin(w http.ResponseWriter, r *http.Request, authSessionI

query := r.URL.Query()
encodedQuery := query.Encode()
formAction := fmt.Sprintf("authorize?%s", encodedQuery)
authorization := endpoint.Authorization[1:]
formAction := fmt.Sprintf("%s?%s", authorization, encodedQuery)
loginToken := h.validator.NewLoginToken(authSessionId)
loginTemplate := h.templateManager.LoginTemplate(loginToken, formAction, message)

Expand Down

0 comments on commit 7a4fd55

Please sign in to comment.