This version adds support for the Stormpath Client API, which is specifically designed for front-end and mobile applications. We suggest converting your React application to using this API for authenticating your users. While the Client API is an easier way to authenticate users and get access tokens, your server is still responsible for authorizing requests with those tokens. Our framework integrations such as Express-Stormpath can still be used for this purpose.
If you are going to use the Client API:
- Please see the current README for an example of how to find your Client API domain and pass it to this library.
- If you are using Express-Stormpath, you should upgrade to 3.2.0 or later, and change any usage of
stormpath.loginRequiredtostormpath.authenticationRequired
If you do not wish to use the Client API:
If you already have a React application that is integrated with one of our server framework integrations, or you simply don't want to use the Client API and prefer to use our standard cookie approach, you can tell the React SDK to use your server with the cookie token strategy. Please see the updated Stormpath React SDK API Documentation for an example.
Deprecated. This version has been deprecated, please upgrade 3.0.0 instead. This version introduced Client API support, but made it difficult to still use our traditional cookie solution for cookie storage.
Nothing to do.
Important:
- If you are seeing the error "Uncaught Invariant Violation: You have provided a history object created with
history v3.x. This version of React Router is not compatible with v3 history objects. Please use history
v2.x instead." you need to double-check your dependencies and if you are using the
historymodule, you need to set that to use version2.1.2. This is because ReactRouter is incompatible withhistoryversions >=3.x.xand2.1.2is the latest2.x.xrelease.
Nothing to do.
Nothing to do.
Important:
- Due to React's new "Unkonwn Prop" warning (see https://facebook.github.io/react/warnings/unknown-prop.html) all
spIfandspBindelement attributes should be prefixed withdata-. I.e.spIfshould bedata-spIfandspBindshould bedata-spBind. Adding thedata-prefix will remove the the "Unkonwn Prop" warnings and guarantee future compatibility.
Nothing to do.
Nothing to do.
Important:
- We've updated to React v15 and React-Router v2. So when upgrading, please see the React v15 upgrade guide and the React-Router v2 upgrade guide.
Nothing to do.
Nothing to do.
Notice:
- The UserComponent and UserField components have been deprecated and will be removed in the future. So if you are using these, please take a look at our new context support instead (see docs). It makes integrating user data into your components much easier.
Breaking:
- The logout request has changed from doing a GET to a POST request. So if you're
using the
express-stormpathmodule you'll have to assure that you're running at leastexpress-stormpathversion3.0.0.
Notice:
- The
LogoutLinkpreviously redirected the user to the path of theLogoutRoute. This has changed. TheLogoutRouteis in fact no longer needed. So instead of redirecting to theLogoutRoutepath, theLogoutLinkwill take care of doing the logout itself.