Inspiration

I was impressed at how quickly with a few lines of code and the auto-OpenAPI+Swagger functionality of FastAPI gets you are functioning API server with documentation. While in proof of concept or early stage development, the interactive features of Swagger-ui become the UI that the team uses until the proper frontend is developed.

Wouldn't it be awesome if the API docs site would have fully functioning Descope authentication without a frontend? Reduce the time for zero to hero for backend developers.

What it does

This is a Swagger-ui plugin which adds Descope flows to the system.

How I built it

First I readup about how to extend Swagger-ui. They have a plugin system, awesome!

Then in my search for examples of plugins, I found that nearly no one knows about it, and almost all the plugin code snippets were in the Swagger Github issue responses by their developers!

Decided to aggregate the plugin source code I could find into a Awesome list: https://github.com/SergeBakharev/awesome-swagger-plugins

Then started coding!

Challenges I ran into

The Swagger plugin system manages hooks in a way that I prevented me using the Descope React SDK, and I had to use the bare JS and Web component libraries.

This is my first React project too, which is a steep learning curve

Accomplishments that I'm proud of

The plugin isn't elegant, but it works!

What I learned

I need to learn more about React. :)

What's next for Descope Swagger-UI Auth Plugin

Publish on npm, and consolidate the configuration

Built With

Share this project:

Updates