@smartcar/auth 2.14.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/npm/sdk.js +5 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ npm install @smartcar/auth
|
|
|
24
24
|
### Smartcar CDN
|
|
25
25
|
|
|
26
26
|
```html
|
|
27
|
-
<script src="https://javascript-sdk.smartcar.com/2.14.
|
|
27
|
+
<script src="https://javascript-sdk.smartcar.com/2.14.1/sdk.js"></script>
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## SDK reference
|
|
@@ -208,4 +208,4 @@ https://application-backend.com/page?error=access_denied&error_description=User+
|
|
|
208
208
|
[tag-image]: https://img.shields.io/github/tag/smartcar/javascript-sdk.svg
|
|
209
209
|
|
|
210
210
|
<!-- Please do not modify or remove this, it is used by the build process -->
|
|
211
|
-
[version]: 2.14.
|
|
211
|
+
[version]: 2.14.1
|
package/dist/npm/sdk.js
CHANGED
|
@@ -303,6 +303,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
303
303
|
* &flags=country:DE color:00819D
|
|
304
304
|
* &user=2dad4eaf-9094-4bff-bb0f-ffbbdde8b562
|
|
305
305
|
*/
|
|
306
|
+
// eslint-disable-next-line complexity
|
|
306
307
|
function getAuthUrl(options) {
|
|
307
308
|
options = options || {};
|
|
308
309
|
var link = '';
|
|
@@ -387,6 +388,10 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
387
388
|
link += "&external_id=".concat(externalId);
|
|
388
389
|
}
|
|
389
390
|
|
|
391
|
+
if (this.responseType === 'none' && !this.redirectUri) {
|
|
392
|
+
link += "&app_origin=".concat(encodeURIComponent(window.location.origin));
|
|
393
|
+
}
|
|
394
|
+
|
|
390
395
|
return link;
|
|
391
396
|
}
|
|
392
397
|
/**
|
|
@@ -575,9 +580,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
575
580
|
console.warn("\nThe Smartcar redirect URI you're using is outdated! To update it, please see:\nhttps://github.com/smartcar/javascript-sdk#1-register-a-javascript-sdk-redirect-uri\n");
|
|
576
581
|
}
|
|
577
582
|
}
|
|
578
|
-
} else if (options.responseType === 'none' && options.onComplete) {
|
|
579
|
-
// eslint-disable-next-line no-console
|
|
580
|
-
console.warn('The "onComplete" callback will not fire for responseType "none" unless a redirectUri is provided.');
|
|
581
583
|
}
|
|
582
584
|
}
|
|
583
585
|
/**
|