Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add telemetry #85

Merged
merged 2 commits into from
Jul 16, 2019
Merged

Add telemetry #85

merged 2 commits into from
Jul 16, 2019

Conversation

joshcanhelp
Copy link
Contributor

@joshcanhelp joshcanhelp commented Jul 15, 2019

Changes

Add telemetry for the auth code exchange and corrects the encoding (was stripping out essential characters used for URL-safe encoding [which is not needed as this sends it as a header]).

Screenshot 2019-07-15 15 34 51

Testing

  • This change adds test coverage
  • This change has been tested on the latest stable version of Node.js

Checklist

  • All existing and new tests complete without errors

@joshcanhelp joshcanhelp marked this pull request as ready for review July 15, 2019 22:35
@joshcanhelp joshcanhelp requested a review from a team July 15, 2019 22:35
lib/index.js Outdated
.replace(/\+/g, '-') // Convert '+' to '-'
.replace(/\//g, '_') // Convert '/' to '_'
.replace(/=+$/, ''); // Remove ending '='
return new Buffer(JSON.stringify(obj)).toString('base64');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this API was deprecated.. the new one is Buffer.from(str)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joshcanhelp joshcanhelp merged commit 105c853 into master Jul 16, 2019
@joshcanhelp joshcanhelp deleted the add-telemetry branch July 16, 2019 16:10
@joshcanhelp joshcanhelp added this to the v1.2.0 milestone Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants