Releases: smartcar/javascript-sdk
v2.3.0
v2.2.2
v2.2.1
v2.2.0
v2.1.1
v2.1.0
v2.0.0
2.0.0 (2018-11-02)
Bug Fixes
- openDialog: move return false to event listener (769a69f)
Code Refactoring
- rename generateLink to getAuthUrl (6ec19a6)
- constructor: replace development with testMode (#36) (1836399)
Features
- Add AccessDenied error class (a048e14)
- ci: setup semantic-release for publishing to NPM (f18cd14)
- ci: verify readme and package.json in CI (cf8eb00)
- constructor: ensure that clientId and redirectUri are passed (fc4d3c2)
- gulp: add command to template version into README (f4fc3ac)
- redirect: modify callback.js to use postMessage (74b06a2)
- sdk: handle messages posted by redirect.js (f0db1eb)
BREAKING CHANGES
-
constructor: The constructor no longer takes the
development
flag,
but instead takes thetestMode
flag. For most purposes the switch from
thedevelopment
flag to thetestMode
flag will be a drop in
replacement.The development flag (now depcreated) instructs the
Smartcar authorization flow (https://smartcar.com/docs#authentication)
to display the special 'Mock' brand. The new 'mode' flag on the other
hand, puts the entire authorization flow into a test mode meaning every
brand now behaves in a manner similar to the special 'Mock' brand.See https://smartcar.com/docs#testing for more information
-
redirect: callback.js now uses the
postMessage
Web API to
interact with the parent window instead of usingwindow.opener
. This
makes it much easier to use the SDK with single page applications where
it is common for the application and the back-end to live on different
origins. To upgrade all that needs to be done is to switch from
callback.js to redirect.js.As a note this breaks compatibility for all browsers that do not support
postMessage
. See https://caniuse.com/#feat=x-doc-messaging for more
details on supported browsers. -
#generateLink
is now#getAuthUrl
, nothing changes
otherwise