node.js - Node Server, is a database necessary for basic authentication if using oauth? -


i'm learning node, doing authentication stuff @ moment passport. server has 2 pages, public home page various login options, super-secret page(and perhaps more) accessible after authenticating.

if i'm going using 3rd party strategies, there reason have database? know you'd need 1 local user's id , pass, if server exclusively relies on 3rd party authentication, session persistence enough things work? or there still various things need save reason (apart logging) ?

could without database, sure... in case point in authenticating @ all? proving user has google account can set free in matter of minutes.

if content super secret chances want have database of users (email addresses , like) have permission see content. authenticating through oauth given access token allow fetch authenticated users email address. can looked against user table see if user registered , if app enforces it, check whether user has access page requested.

oauth proving person owner of google/facebook/twitter/github account. can use knowledge sign in against database of "local accounts" based on email used @ sign up, assuming validate email on sign locally.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -