Blog Posts by Date | tag: 'authomatic'


Easy and flexible flask login with authomatic and mongoengine


July 12, 2021 / 47 min read / 7,778 views, 6 likes, 3 comments


Flask Authomatic Cover

Many users like the simplicity of clicking one button to register and/or log into a website using one of their existing logged-in accounts on another website such as Facebook or Google. This is OAuth user authentication. But sometimes users don't have those other accounts so it's good to provide them with a full-proof means of logging in to a site. That's username/password authentication. Well for your site why don't you give users both options?

In this article, I'll talk about how you can log in and register users for your flask application with flexibility by allowing either OAuth2 or username/password authentication. We'll be using Flask for our web framework, MongoDB for our database, and authomatic for our OAuth authentication framework. But if those don't apply to you, don't fret! Many of the concepts discussed here can be applied to your web stack too!

Read more...