@@ -53,6 +53,11 @@ func CreateNewSessionWithContextWithoutRequestResponse(userID string, accessToke
5353 finalAccessTokenPayload = map [string ]interface {}{}
5454 }
5555
56+ appInfo := instance .RecipeModule .GetAppInfo ()
57+ issuer := appInfo .APIDomain .GetAsStringDangerous () + appInfo .APIBasePath .GetAsStringDangerous ()
58+
59+ finalAccessTokenPayload ["iss" ] = issuer
60+
5661 for _ , claim := range claimsAddedByOtherRecipes {
5762 finalAccessTokenPayload , err = claim .Build (userID , finalAccessTokenPayload , userContext )
5863 if err != nil {
@@ -69,7 +74,7 @@ func CreateNewSessionWithContextWithoutRequestResponse(userID string, accessToke
6974 return (* instance .RecipeImpl .CreateNewSession )(userID , accessTokenPayload , sessionDataInDatabase , & _disableAntiCSRF , userContext )
7075}
7176
72- func GetSessionWithContext (req http.Request , res http.ResponseWriter , options * sessmodels.VerifySessionOptions , userContext supertokens.UserContext ) (sessmodels.SessionContainer , error ) {
77+ func GetSessionWithContext (req * http.Request , res http.ResponseWriter , options * sessmodels.VerifySessionOptions , userContext supertokens.UserContext ) (sessmodels.SessionContainer , error ) {
7378 instance , err := getRecipeInstanceOrThrowError ()
7479 if err != nil {
7580 return nil , err
@@ -100,7 +105,7 @@ func GetSessionWithContextWithoutRequestResponse(accessToken string, antiCSRFTok
100105 if err != nil {
101106 return nil , err
102107 }
103- claimValidators , err := GetRequiredClaimValidators (* result , overrideGlobalClaimValidators , userContext )
108+ claimValidators , err := GetRequiredClaimValidators (result , overrideGlobalClaimValidators , userContext )
104109
105110 if err != nil {
106111 return nil , err
@@ -114,7 +119,7 @@ func GetSessionWithContextWithoutRequestResponse(accessToken string, antiCSRFTok
114119
115120 }
116121
117- return * result , nil
122+ return result , nil
118123}
119124
120125func GetSessionInformationWithContext (sessionHandle string , userContext supertokens.UserContext ) (* sessmodels.SessionInformation , error ) {
@@ -372,7 +377,7 @@ func CreateNewSessionWithoutRequestResponse(userId string, accessTokenPayload ma
372377 return CreateNewSessionWithContextWithoutRequestResponse (userId , accessTokenPayload , sessionDataInDatabase , disableAntiCSRF , nil )
373378}
374379
375- func GetSession (req http.Request , res http.ResponseWriter , options * sessmodels.VerifySessionOptions ) (sessmodels.SessionContainer , error ) {
380+ func GetSession (req * http.Request , res http.ResponseWriter , options * sessmodels.VerifySessionOptions ) (sessmodels.SessionContainer , error ) {
376381 return GetSessionWithContext (req , res , options , & map [string ]interface {}{})
377382}
378383
@@ -412,7 +417,7 @@ func UpdateSessionDataInDatabase(sessionHandle string, newSessionData map[string
412417 return UpdateSessionDataInDatabaseWithContext (sessionHandle , newSessionData , & map [string ]interface {}{})
413418}
414419
415- func CreateJWT (payload map [string ]interface {}, useStaticSigningKey * bool , validitySecondsPointer * uint64 ) (jwtmodels.CreateJWTResponse , error ) {
420+ func CreateJWT (payload map [string ]interface {}, validitySecondsPointer * uint64 , useStaticSigningKey * bool ) (jwtmodels.CreateJWTResponse , error ) {
416421 return CreateJWTWithContext (payload , validitySecondsPointer , useStaticSigningKey , & map [string ]interface {}{})
417422}
418423
0 commit comments