pass discord ID to session
I am trying to pass a users Discord ID through to the user object in session. I am aware of mapProfileToUser but not of how to use it to accomplish adding it to the session. I know how to add it custom fields to the session, just not how to get the profile object from socialProviders: {
discord to custom session
2 Replies
why do you need the discord id in the session object
just add it to request context no?
Ok my code for mapping it:
And there is example code for the organizations plugin that shows how to pass data in the session before its created so use that sample:
But I am interested to see how others would do this.