使用身份驗證登錄和註冊使用者

The most important component of a website is having users. Real humans who can contribute to the website. If Facebook had no users then it would just be adverts. If blogs had no users then it would just be the ramblings of an author.

But in order to have users and associate data to user accounts, we need a way to register them and allow them to sign back into their accounts at a later date.

網站最重要的組成部分是擁有使用者。可以為網站做出貢獻的真實人類。如果Facebook沒有使用者,那麼它只是廣告。如果博客沒有用戶,那麼它只是作者的漫談。

但是,為了讓使用者和數據與使用者帳戶相關聯,我們需要一種方法來註冊他們,並允許他們稍後重新登錄他們的帳戶。

This means they will be giving us some information that we have to keep secure. This is what authentication is all about, how to figure out if a user really is who they say they are. And that is the goal of today; Figure out how to register, login and logout users with email and password. So they can access their own private profile pages.

Also, we're going to allow users to download a top-secret Flask Programming Cheat Sheet. But only when they have registered and signed up to our website.

Here's a demo of what we'll create by the end of the day:

這意味著他們將向我們提供一些我們必須確保安全的資訊。這就是身份驗證的全部內容,如何確定使用者是否真的是他們所說的人。這就是今天的目標;弄清楚如何使用電子郵件和密碼註冊、登錄和註銷使用者。因此,他們可以訪問自己的私人個人資料頁面。

此外,我們將允許使用者下載絕密的燒瓶程式設計備忘單。但前提是他們註冊並註冊了我們的網站。

以下是我們將在一天結束時創建的內容的演示:

https://img-c.udemycdn.com/redactor/raw/2020-10-18_15-04-40-45018d8b0496e0f579044a148e53fcf0.gif