DEV Community

Debashish Palit
Debashish Palit

Posted on

Adding auth to the app

I was busy adding auth functionality to my Blogfinder app the last few days. It is an essential, though not main, part of the app. Adding auth is quite routine, but, by no means, a trivial task. I had to code the views, forms and templates. Took some code from the Flask mega tutorial. Flask-login and flask-mail play nicely with the framework I have chosen - quart.

I struggled with the password reset email functionality. Sending async emails with quart and flask-mail is not straight-forward. I was constantly getting a coroutine not awaited warning when trying to run a sync function from a thread started by the async route. I had to take help from a forum post by quart's creator to solve the issue.

I completed the login, register and password-reset parts of the application. Then I started working on the profile page. I add the routes and forms for the profile add and edit pages. Tomorrow I will start with showing the profile page and then move onto the "user follow" functionality which, I suppose, will take quite a bit of time.

Top comments (0)