thingco / shared-frontend-libs

0 stars 0 forks source link

[FEAT] - auth flow logging #49

Open DanCouper opened 3 years ago

DanCouper commented 3 years ago

Which package does this affect?

If this covers multiple packages, if possible open an issue for both and PR separately: this will keep the PR's scope as small as possible (plus each package needs separate version bumps & republishing after the fix has been applied).

Is your feature request related to a problem? Please describe. The flow all technically works, but it needs more information about what's happening at any one time as it's difficult to trace errors (eg when a request to login fails -- expected error, but need feedback for development). This can all be debugged using the visualiser here (although it's still difficult to see exactly what's happening), but when dealing with a React Native app, that's not really an issue.

Describe the solution you'd like Show auth flow progress in console.

Add a logging framework -- could just wrap console.{method}, but would be useful to use a preexisting library that is a bit more battle-tested and allows turning logging off in prod.