Hi, Our current functionality is build on Flask, but flask is not supporting Async completely which ...
n
Hi, Our current functionality is build on Flask, but flask is not supporting Async completely which is required for one of our requirements. So, we were planning to move to Quart framework. So, the question is, SuperTokens support Flask, FastAPI and Django REST framework Out of the Box. Can we do to run SuperTokens on Quart as well?
r
hey @namanchhabra_60978
You could add support for quart similar to how we have added support for flask.
alternatively, you could spin up a flask server just for supertokens.
n
@rp_st Can you please guide me on #1? Or is there any documentation present for the same? for #2, yes that can be done, but all the other APIs will be running on Quart server. So, how will the verify session and other functionality work there?
r
for verify session, you can use any jwt verification lib, you use the get_session_without_request_response function from our python SDK. As for the first point, I don't think i'll have time this week to help. But you can see our source code and figure it out yourself.
n
And what about RBAC supported by verify session decorator?
JWT verification, yes it can be done with the library. But the roles for which any partiucalr API is allowed to be access can only be given in verify_session decorator right?
r
you can use RBAC with get_session_without_request_response too
or you can also check the RBAC claims manually from the decoded JWT (which is the result of jwt verification)
n
Ah alright! Thanks! One last question, Considering the supertokens run ning on a flask sever and rest whole project running on Quart, how will we be integrating the two and using the get_session_without_request_response function from the python SDK in the quart app considering, supertokens won't be initialised there?
r
supertokens will need to be init, but just the session recipe and email verification recipe. No need to add the middleware.. you can just use get_session_without_request_response (see our docs for how to use it)
8 Views