smartcar / javascript-sdk

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

Redirect #28

Closed nathanshelly closed 5 years ago

nathanshelly commented 6 years ago

Update to the Javascript-SDK for auth flow. This update use postMessage to communicate between redirect window and opening window instead of attaching onComplete to window of the redirect. Allows usage of SDK with separate front and back ends as postMessage works cross origin.

For example usage see React demo in javascript-demos.

Part of this change involves Smartcar hosting redirects on its own CDN, thereby eliminating developers' need for a /redirect route on their backend if they opt in. This change will add extra UI on the developer dashboard to make the process clear.

Any feedback is appreciated, in addition there are a few areas that I would specifically like to hear ideas. These center around naming of parameters (smartcarAuthMessage, useSmartcarHostedRedirect & redirectURI.

codecov[bot] commented 5 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@aa482ce). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##             master    #28   +/-   ##
=======================================
  Coverage          ?   100%           
=======================================
  Files             ?      2           
  Lines             ?     15           
  Branches          ?      2           
=======================================
  Hits              ?     15           
  Misses            ?      0           
  Partials          ?      0
Impacted Files Coverage Δ
test/integration/config/index.js 100% <100%> (ø)
src/redirect.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aa482ce...5497410. Read the comment docs.