Hey everyone 👋 I'm trying to use supertokens wit...
# general
x
Hey everyone 👋 I'm trying to use supertokens with fastify, before I've run successfully docker image, but now I'm confused and can't find any examples where you define signup route with EmailPassword recipe For now my code looks like:
Copy code
typescript
// ...

SuperTokens.init({
  framework: 'fastify',
  supertokens: {
    connectionURI: 'http://localhost:3567'
  },
  appInfo: {
    appName: 'SuperTokens Demo App',
    apiDomain: 'http://localhost:3001',
    websiteDomain: 'http://localhost:3000',
  },
  recipeList: [
    EmailPassword.init(),
    Session.init()
  ]
})

fastify.setErrorHandler(errorHandler())

fastify.get('/', {
  preHandler: verifySession()
}, (request: FastifyRequest, reply: FastifyReply) => request.session.getUserId())

fastify.get('/auth/login', async (request: FastifyRequest, reply: FastifyReply) => {
  // Here I got credentials from query for example
  const {email, password} = request.query

  // What's next? Which of the methods I should call?
})