@@ -156,6 +156,10 @@ Related functions/prop names have changes (`sessionData` became `sessionDataFrom
156156
157157- You should now set ` CheckDatabase ` to true in the verifySession params.
158158
159+ #### If you used to set ` access_token_signing_key_dynamic ` in the core config
160+
161+ - You should now set ` useDynamicAccessTokenSigningKey ` in the Session recipe config.
162+
159163#### If you used to use standard/protected props in the access token payload root:
160164
1611651 . Update you application logic to rename those props (e.g., by adding a prefix)
@@ -240,6 +244,63 @@ func main() {
240244}
241245```
242246
247+ #### If you added an override for ` CreateNewSession ` /` RefreshSession ` /` GetSession ` :
248+
249+ This example uses ` GetSession ` , but the changes required for the other ones are very similar. Before:
250+
251+ ``` go
252+ session.Init (&sessmodels.TypeInput {
253+ Override : &sessmodels.OverrideStruct {
254+ Functions: func (originalImplementation sessmodels.RecipeInterface ) sessmodels.RecipeInterface {
255+ originalGetSession := *originalImplementation.GetSession
256+
257+ newGetSession := func (req *http.Request , res http.ResponseWriter , options *sessmodels.VerifySessionOptions , userContext supertokens.UserContext ) (sessmodels.SessionContainer , error ) {
258+ response , err := originalGetSession (req, res, options, userContext)
259+
260+ if err != nil {
261+ return nil , err
262+ }
263+
264+ return response, nil
265+ }
266+
267+ *originalImplementation.GetSession = newGetSession
268+ return originalImplementation
269+ },
270+ },
271+ })
272+ ```
273+
274+ After:
275+
276+ ``` go
277+ session.Init (&sessmodels.TypeInput {
278+ Override : &sessmodels.OverrideStruct {
279+ Functions: func (originalImplementation sessmodels.RecipeInterface ) sessmodels.RecipeInterface {
280+ originalGetSession := *originalImplementation.GetSession
281+
282+ newGetSession := func (accessToken string , antiCSRFToken *string , options *sessmodels.VerifySessionOptions , userContext supertokens.UserContext ) (sessmodels.SessionContainer , error ) {
283+ defaultUserContext := (*userContext)[" _default" ].(map [string ]interface {})
284+ request := defaultUserContext[" request" ]
285+
286+ print (request)
287+
288+ response , err := originalGetSession (accessToken, antiCSRFToken, options, userContext)
289+ if err != nil {
290+ return nil , err
291+ }
292+
293+ return response, nil
294+ }
295+
296+ *originalImplementation.GetSession = newGetSession
297+
298+ return originalImplementation
299+ },
300+ },
301+ }),
302+ ```
303+
243304## [ 0.11.0] - 2023-04-28
244305- Added missing arguments in ` GetUsersNewestFirst ` and ` GetUsersOldestFirst `
245306
0 commit comments