Firebase 俾 Google 買咗之後,Google 最近結合 Google Cloud Messaging 重新推出,叫 Firebase Cloud Messaging,增多咗好多功能,我係 Google 粉絲,又有用開 Google Cloud Services 當然要幫襯下,我打算用兩項:Authentication 同 Cloud Messaging,今次就先講講 Authentication。
Firebase 有咩玩?睇圖:
使唔使錢?有免費版(SPARK):
如果係 project 仔就應該夠用,超出嘅話,俾多少都好應該吖,當然,唔使俾就永遠都係最好嘅! 😀
開波:
非常好!我就係要咁:
- 用 email 加 password 做登入
User 用 browser 訪問你個 web app,你問佢想用咩方法登入,佢選咗,你再問佢 user name 同 password,你個 web app 將啲答案收咗,發俾 Firebase,Firebase 確認之後,回覆你個 web app。 - 用 Google Gmail account 做登入
User 用 browser 訪問你個 web app,你問佢想用咩方法登入,佢選咗,Firebase 轉問 Google,Google 就請 user login 一下,成功 login,Firebase 確認之後,回覆你個 web app。
其他 Social Logins(例如 Facebook)唔搞囉,一里通百里明!