Skip to content

Commit a8f2263

Browse files
committed
Add debug logs for GetSessionFromRequest
1 parent 51a6dec commit a8f2263

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

recipe/session/sessionRequestFunctions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ func CreateNewSessionInRequest(req *http.Request, res http.ResponseWriter, confi
117117
func GetSessionFromRequest(req *http.Request, res http.ResponseWriter, config sessmodels.TypeNormalisedInput, options *sessmodels.VerifySessionOptions, recipeImpl sessmodels.RecipeInterface, userContext supertokens.UserContext) (sessmodels.SessionContainer, error) {
118118
idRefreshToken := GetCookieValue(req, legacyIdRefreshTokenCookieName)
119119
if idRefreshToken != nil {
120+
supertokens.LogDebugMessage("GetSessionFromRequest: Returning TryRefreshTokenError because the request is using a legacy session and should be refreshed")
120121
return nil, errors.TryRefreshTokenError{
121122
Msg: "using legacy session, please call the refresh API",
122123
}

0 commit comments

Comments
 (0)