How to access/verify the contents of the firebase auth object when using firebase simple login? -


is possible access/verify contents of firebase auth object when using firebase simple login? useful debugging / configuring security rules.

for additional debugging of auth. token , security rules when using firebase simple login, have 2 great tools @ disposal:

  1. enable debug mode, passing optional debug: true flag when generating custom firebase token. cannot automatically when using delegated authentication service due security constraints, may generate tokens via custom login.

    also, try enabling debug-mode on client library following command, yield additional information such paths being read or written to, , data going on wire:

    firebase.enablelogging(true, true);

    authclient.login('twitter', { debug: true });

  2. as suggest, take peek @ contents of authentication token. there few ways this. easiest manually pass firebaseref.auth(), , examine response payload returned in callback, contains contents of auth. token. alternatively, since firebase auth. tokens follow open json web token (jwt) standard, can parse contents of auth. token base64-decoding each of token sequences, separated period (.).

    normally, firebase simple login automatically handles step you, can manually call ref.auth(<token>, function(authdata) { ... });, token available via user.firebaseauthtoken after authenticating simple login.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -