If you want to add custom attributes during session creation, you can do that by overriding the createNewSession function
As shown in the first part of the link above
m
mukulg22
01/06/2023, 4:31 AM
Hey @rp, in the example I see that the role set is static value in createNewSession method. How do I pass dynamic values in this case?
r
rp
01/06/2023, 4:58 AM
you can write your own code in the function to get any attribute dynamically. It's just a regular function
m
mukulg22
01/06/2023, 6:46 AM
meanwhile, how do I get the user email in this method? I dont find it in the accessToken @rp
r
rp
01/06/2023, 6:46 AM
you can get the user ID and then get the user info from the recipe function (i think there should be a getUserById function), and then add that into the access token payload