add missing timeout to oauth handler

Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
Ronni Skansing
2026-02-28 01:28:56 +01:00
parent c3271e1eee
commit b7d440b183
+4 -1
View File
@@ -7,6 +7,7 @@ import (
"io"
"net/http"
"strings"
"time"
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
"github.com/gin-gonic/gin"
@@ -220,7 +221,9 @@ func (s *SSO) HandlEntraIDCallback(
}
func (s *SSO) getMsGraphMe(ctx context.Context, accessToken string) (*MsGraphUserInfo, error) {
client := &http.Client{}
client := &http.Client{
Timeout: 10 * time.Second,
}
req, err := http.NewRequestWithContext(ctx, "GET", "https://graph.microsoft.com/v1.0/me", nil)
if err != nil {
return nil, errs.Wrap(err)