Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Commit

Permalink
Set user agent in Vue
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Damphousse committed Mar 16, 2018
1 parent 6727078 commit b4312aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/okta-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
"src"
],
"scripts": {
"prebuild": "npm run build:package-info",
"prestart": "npm run build",
"pretest": "npm run build && npm run build:harness",
"prepublish": "npm run build",
"test": "npm run --prefix test/e2e/harness/ test",
"start": "npm run --prefix test/e2e/harness/ start",
"build": "rimraf dist/ && cross-env NODE_ENV=production webpack --config webpack.config.js --output-library-target=umd -p",
"build:harness": "npm --prefix test/e2e/harness install",
"build:package-info": "node ../../util/write-package-info.js . src/packageInfo.js",
"lint": "eslint --ext .js,.vue src"
},
"repository": {
Expand Down
2 changes: 2 additions & 0 deletions packages/okta-vue/src/Auth.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as AuthJS from '@okta/okta-auth-js'
import packageInfo from './packageInfo'
import ImplicitCallback from './components/ImplicitCallback'

function install (Vue, options) {
Expand All @@ -9,6 +10,7 @@ function install (Vue, options) {
redirectUri: authConfig.redirect_uri,
url: authConfig.issuer.split('/oauth2/')[0]
})
oktaAuth.userAgent = `${packageInfo.name}/${packageInfo.version} ${oktaAuth.userAgent}`

Vue.prototype.$auth = {
loginRedirect (additionalParams) {
Expand Down

0 comments on commit b4312aa

Please sign in to comment.