Skip to content

Commit 9becc8f

Browse files
Do not use session user id as event context user id
ref DEV-2931
2 parents d5878e5 + 544c95e commit 9becc8f

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

pkg/lib/event/service.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
adminauthz "github.com/authgear/authgear-server/pkg/lib/admin/authz"
99
"github.com/authgear/authgear-server/pkg/lib/config"
1010
"github.com/authgear/authgear-server/pkg/lib/infra/db"
11-
"github.com/authgear/authgear-server/pkg/lib/session"
1211
"github.com/authgear/authgear-server/pkg/lib/uiparam"
1312
"github.com/authgear/authgear-server/pkg/util/clock"
1413
"github.com/authgear/authgear-server/pkg/util/geoip"
@@ -202,13 +201,11 @@ func (s *Service) nextSeq(ctx context.Context) (seq int64, err error) {
202201
}
203202

204203
func (s *Service) makeContext(ctx context.Context, payload event.Payload) event.Context {
205-
userID := session.GetUserID(ctx)
204+
var userID *string
206205

207-
if userID == nil {
208-
uid := payload.UserID()
209-
if uid != "" {
210-
userID = &uid
211-
}
206+
uid := payload.UserID()
207+
if uid != "" {
208+
userID = &uid
212209
}
213210

214211
preferredLanguageTags := intl.GetPreferredLanguageTags(ctx)

0 commit comments

Comments
 (0)