Hola , any one managed to integrate with next-auth.js ?
r
Hola , any one managed to integrate with next-auth.js ?
r
hey @rakanjawanh there is a way that uses their credentials flow, but ideally, you should remove next-auth entirely when using supertokens.
r
what about OCID ?
r
You mean OIDC?
r
sorry yes
r
No, that won't work since we are not an oauth provider.
not yet anyway. But will be in a few months
r
ammm any ideal solution for svelte-kit app ? ( to integrate with super-tokens )
p
Although it's a bit late to respond and your question is hijacking the original, I still want to. I have the same requirement to integrate SvelteKit with SuperTokens, and I found this resource: https://github.com/ITenthusiasm/svelte-kit-supertokens. I haven't tried it yet, but I definitely plan to and would like to thank the author @ITEnthusiasm, thank you. I'll attempt to adapt it for my use case involving magic links. By the way, the link @rp_st provided (for Svelte) doesn't seem helpful for what you asked (SvelteKit), and I really wonder why SvelteKit appears to be neglected (perhaps due to a small team and few time). Some official documentation or examples would be beneficial for SvelteKit and I guess for SuperTokens too.
i
Just as a heads up, the Svelte Kit Supertokens app should work fine with its version of
SuperTokens
. But if you decide to upgrade SuperTokens, you'll have to make the API migrations mentioned in their documentation. Besides that, everything should work fine. I'd like to upgrade the SuperTokens version when I get the chance. I just haven't had the opportunity yet. (I will have time soon-ish after I release my form-validation library.) But yes, as far as I'm aware, that SvelteKit SuperTokens repo is the closest thing to integrating SuperTokens into SvelteKit in the "proper way" (unless someone recently forked that repo or created something better). It's similar to its Remix alternative (which is also on an older version of SuperTokens). Happy to answer any questions (though in my current season of life, I can't promise swift responses).
--- @rp_st Just personal thoughts: I get really nervous when I see the SuperTokens team providing "solutions" requiring React for other frontend frameworks. This forces developers to bring a much larger bundle size than should be necessary to their applications. And my assumption is that many devs will not buy this hack (because they're intentionally leaving React for Vue/Svelte/Solid/etc. to avoid bloat and performance issues). When I first saw it with Vue, I assumed it was a one-off thing. But now that this seems to be a thing with Svelte, I really think the ST team should reconsider their approach. We want to attract users and support more devs, yes. But no dev wants to download several React packages to get a Svelte/Vue app up and running. I think a better solution would be for the team to take time to consider what each individual framework needs, and to build solutions around that framework (instead of trying to shoehorn React in). If the team doesn't have time for this, it might be worth hiring a frontend dev who has this knowledge, or giving more support to devs in the community who have this knowledge. It's also possible that refactors in more central libraries could be useful (just like how refactors in
supertokens-node
made SvelteKit support easier). It also might be worthwhile for the ST Team to review the SvelteKit repo that I made (and potentially make updates). When I suggested it earlier, it seems the team didn't have time to look into it. But looking into that project (which has been around for awhile) might prove easier than trying to write examples like the one you linked. And it may result in something more aligned with what Svelte devs truly want.
r
I totally agree with you @ITEnthusiasm! I also don’t like the injecting of react on the auth route, but at the moment, if someone wants to use our pre built ui, that’s the only way. People can always choose to go the custom UI route though.
I’m terms of maintaining the sveltekit app, we really don’t have time for it even now (unfortunately). We have a 2 big features (MFA and Oauth provider) that we need to build, and then perhaps after that we can take over the sveltekit repo :). That being said, thank you for making it
i
That busy, huh? That's rough. 😅 But those are features that will benefit the community too.
r
Yeaaa. Unfortunately, that busy indeed. But we will get to it within a few months for sure.
i
Sounds good
3 Views