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:
enable
debug
mode, passing optionaldebug: 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 });
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 viauser.firebaseauthtoken
after authenticating simple login.
Comments
Post a Comment