@@ -197,11 +197,13 @@ func (r *mutationResolver) SignOut(ctx context.Context) (*types.SignOutPayload,
|
|||||||
err := r.iam.SessionService.CloseSession(ctx, session.ID)
|
err := r.iam.SessionService.CloseSession(ctx, session.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_, notFound := errors.AsType[*iam.ErrSessionNotFound](err)
|
_, notFound := errors.AsType[*iam.ErrSessionNotFound](err)
|
||||||
|
|
||||||
_, expired := errors.AsType[*iam.ErrSessionExpired](err)
|
_, expired := errors.AsType[*iam.ErrSessionExpired](err)
|
||||||
if !notFound && !expired {
|
if !notFound && !expired {
|
||||||
r.logger.ErrorCtx(ctx, "cannot close session", log.Error(err))
|
r.logger.ErrorCtx(ctx, "cannot close session", log.Error(err))
|
||||||
return nil, gqlutils.Internal(ctx)
|
return nil, gqlutils.Internal(ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Already closed or missing — still clear the cookie so the browser
|
// Already closed or missing — still clear the cookie so the browser
|
||||||
// drops the stale session on concurrent / retried logout.
|
// drops the stale session on concurrent / retried logout.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user