Does supertokens use openapi ? if yes, Elixir SDK ...
# support-questions
t
Does supertokens use openapi ? if yes, Elixir SDK can be generated via cli. Please let me know.
r
Hey! We don’t yet have an elixir SDK.
And we are not yet an OAuth provider either. But we do issues jwts which you can consume in your elixir backend, if you can run a node / golang or python server which integrates with our sdk
t
can you send me a github repo with examples?
python backend if possible.
r
We don’t have an example of this exact setup, but ill explain in a while.
t
ok. I appreciate your quick replies.
Let me know when you can explain.
r
So the way this should work is that you need to host a python server that integrates with our backend SDK. This has to be in the same domain or a different sub domain as the api domain (your elixir sever).
Your frontend will call the python server for auth, and the server will create a new cookies based session between the frontend and your api domain.
Now when your frontend queries the elixir layer, it should attach the JWT in the request and the elixir can do JWT verification
t
I see.
Thanks for explaining things. i'll try this out and let you know.
r
Cool!
t
Hey.
I have a question.
If you use, openAPI 3.0 /Swagger for API documentation, an SDK can be generated for elixir via https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/elixir.md
https://app.swaggerhub.com/apis/supertokens/FDI/1.14.0#/servers From this image, can I generate my Frontend SDK for Elixir? Is it advisable?
supertokens-FDI-1.14.0-resolved.json
---this is the file I have used to generate frontend driver Interface for Elixir. any feedback is appreciated.
https://github.com/TwistingTwists/ex_supertokens_FDI Pointers where feedback is needed: 1. This code can be used to integrate FrontEnd in Elixir. Is my understanding correct? 2. My plan is - using above generated Elixir FDI for frontend (elixir templates - just like Django templates) + a python / golang backend (for lot of good stuff related to emailing etc)
r
hey @twistingtwists The Elixir backend doesn't need to have the APIs that are specified in the FDI spec. The python / golang backend already has those (provided by our SDK). So the frontend would query the python / golang backend for auth related APIs (like sign in / sign out etc..). These are all the APIs specified in the FDI swagger spec. The elixir backed just needs to have your app's API and do JWT verification using any lib available in Elixir.
t
Can we jump on a quick Short call if possible ?
may be just 1-15 minutes.
It'd help me understand how to integrate it in my app.
r
Hey yea. Sure. There is a link on our site using which you can book a call with us. Use that
t
ok
thank you
Done. Tomorrow 11.30 am. THank you .
r
👍
7 Views