Skip to content

[QUESTION] Express Session #96

Answered by wobsoriano
angelhdzdev asked this question in Q&A
Discussion options

You must be logged in to vote

Check the tRPC Context docs and if youre using nuxt-iron-session for example, you can return the session object in the context:

export default createNuxtApiHandler({
  router: appRouter,
  createContext: (event) => {
    return {
      session: event.context.session
    }
  },
})

Combine it with trpc-shield :)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wobsoriano
Comment options

Answer selected by angelhdzdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #79 on May 20, 2023 19:16.