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

[SDK-1697] Add custom user agent to spa js #28

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

adamjmcgrath
Copy link
Contributor

@adamjmcgrath adamjmcgrath commented Jun 2, 2020

Description

Add name and version user agent details to pass to auth0-spa-js

References

auth0/auth0-spa-js#490

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@adamjmcgrath adamjmcgrath added small This PR may require low effort to action, or contains few changes to review CH: Added PR is adding feature or functionality labels Jun 2, 2020
@adamjmcgrath adamjmcgrath requested a review from a team June 2, 2020 17:17
@adamjmcgrath adamjmcgrath changed the title Add custom user agent to spa js [SDK-1697] Add custom user agent to spa js Jun 2, 2020
Copy link
Contributor

@lbalmaceda lbalmaceda left a comment

Choose a reason for hiding this comment

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

LGTM. A few outstanding questions, but not blockers.

expect.objectContaining({
auth0Client: {
name: 'auth0-react',
version: pkg.version,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this have the env property with the node version here? I remember a recent discussion but not the outcome.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a browser SDK so no node version, we should get the browser name and version from the User-Agent header

@@ -110,6 +110,11 @@ export interface Auth0ProviderOptions extends PropsWithChildren<{}> {
[key: string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any
}

/**
* @ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that the doc block is already here, could we add a short description of what this value represents?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure - I'll add a description in the docs PR

@adamjmcgrath adamjmcgrath merged commit b645c18 into master Jun 4, 2020
@adamjmcgrath adamjmcgrath deleted the add-custom-user-agent branch June 4, 2020 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Added PR is adding feature or functionality small This PR may require low effort to action, or contains few changes to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants