I'm looking into SuperTokens for an app I coded using Hono on Node (https://hono.dev/). I see that it's not one of the frameworks that currently have a middleware (like Express or Fastify).
I saw in the codebase that there is also a directory for a "custom" framework but couldn't find any documentation on how it's supposed to be used.
Would it be a good way to integrate with Hono or should code the middleware for Hono taking the one from Express as example ? Would it be an interesting contribution ?
r
rp_st
04/11/2024, 4:07 PM
hey @.a.t.n. you can take inspiration from our remix integration on how to add a custom framework. You can generate a remix app using
npx create-supertokens-app@latest
u
.a.t.n.
04/11/2024, 4:07 PM
message has been deleted
.a.t.n.
04/11/2024, 4:24 PM
In my case I'm using Hono only for API. I understand that in the Remix example, what I should look into are the backend SDK integration in those files:
- config/backend.tsx
- routes/sessioninfos.$.tsx
- routes/supertokens.$.tsx
- superTokensHelpers.ts
- entry.server.tsx
and that the rest would be handled by the client-side React SDK from SuperTokens.
Am I understanding it right?
r
rp_st
04/11/2024, 4:25 PM
yup. So, sessioninfo is not required (thats just an example api). But others, yea.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).