Is there any type of guide to use SuperTokens with...
# support-questions-legacy
v
Is there any type of guide to use SuperTokens without the frameworks coupling? i feel the SDK documentation a bit confuse, i just need to decouple from the framework and add some logic...
r
Hey @Vrl I’m not really sure what you mean by decouple here. You can customise logic via the overrides feature if you like.
v
I mean, im developing my API according to the SOLID, so i decouple the framework from the use cases/application services
In that way i can switch my framework from fastapi to flask for example
In my opinion/research that means that my authentication logic must be inplemented in the application service
So i cant just setup the supertokens middleware
In simple words i need the code that comes with the routes like in emailpassword recipe to singin or signup
Something like supertokens.recipe.emailpassword.signin(email, passw) (idk if is this)
r
I see. So those functions do exist, for example
await supertokens.recipe.emailpassword.asyncio.signIn(email, password)
or for syncio, it's
supertokens.recipe.emailpassword.syncio.signIn(email, password)
. Likewise, each recipe has all the appropriate functions exposed so using those, you can make your own APIs.
v
i guess these are exactly what i needed
but what do i need to make these calls? do i need to setup something? like in the supertokens instance
can you make an simple function example that work as it is??
r
You will need to call supertokens.init with the appropriate recipe initialised
That’s all that’s needed
v
hm ok
ty
3 Views