smartcar / javascript-sdk

Client-side JS SDK for OAuth dialogs.
MIT License
9 stars 5 forks source link

feat: add and pass `virtualKeyUrl` param to onComplete handler #80

Closed allisonc07 closed 9 months ago

allisonc07 commented 9 months ago

For brands that require a virtual key to be registered on the vehicle in order to receive data and/or send commands to the vehicle, Smartcar will be sending back an additional query parameter, virutal_key_url, when redirecting back with the authorization code. This PR:

  1. includes the value of the virtual_key_url in the message that is postMessage'd back to the origin
  2. updates the interface of the onComplete to include a new parameter, virtualKeyUrl
  3. and passes the value of the virtualKeyUrl property on the message object to the onComplete function.

From there, the virtualKeyUrl can be used within the onComplete that is created by the developer, and passed onto the BE, etc. so that it can be sent to the appropriate vehicle owners.

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8a13f06) 100.00% compared to head (3e102a1) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #80 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 1 1 Lines 9 9 Branches 2 2 ========================================= Hits 9 9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

smartcar-ci commented 9 months ago

:tada: This PR is included in version 2.10.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: