- #301 adds support for
okta-auth-js@8.0.0
-#295 fix: wraps OktaContext in a useMemo to reduce re-renders and improve performance
- Resolve #294
-#296 fix: upgrades @babel/runtime to 7.27.0 to resolve CVE
-#284 fix: passes the return value of restoreOriginalUri(), so promises will be awaited
-#266 Fixes useEffect double render in React18 StrictMode
-#248 Adds support for @okta/okta-auth-js 7.x
- Bumps minimum node version to
14
- #239
- Fixes
Two custom restoreOriginalUri callbacks are detectedwarning, will only fire once on<Security>didMount - Fixes react-router v6 routing samples, no longer calls
/authorizeon page load with valid, active session
- Fixes
- #233
- Removes
oktaAuth.stop()from<Security> - Removes
oktaAuth.start()from<LoginCallback>afterhandleLoginRedirect() - Fixes
useEffecthook in<Security>- don't watch forrestoreOriginalUriprop to perform side effects (start, subscribe, unsubscribe) onoktaAuth - Upgrades internal dependencies
- Removes
- #213
- Avoids build time error when
react-router-domv6 is in app dependencies - Throws unsupported error when
SecureRouteis used withreact-router-domv6
- Avoids build time error when
- #199 Fixes okta-auth-js peer dependency error
- #200 Fixes: Typescript types when using
react-router-domv6 withokta-react - #201 Removes
process.envreference from the bundles
- #193 Fixes: Cannot find module 'compare-versions' from '../node_modules/@okta/okta-react/bundles/okta-react.cjs.js'
- #191 Set
okta-auth-jsminimum supported version as 5.3.1,AuthSdkErrorwill be rendered if oktaAuth instance cannot meet the version requirement
- #172 Adds
errorComponentprop toSecureRouteto handle internalhandleLoginrelated errors
- #159 Updates internal dependency
- #67 Adds
loadingElementprop toLoginCallbackcomponent
- #146 Fixed TypeScript definitions
- #112 Only unsubscribe the
AuthStateManagerhandler subscribed by<Security /> - #152 Fix token auto renew by using @okta/okta-auth-js ^5.2.3
- #120 Requires @okta/okta-auth-js 5.x
- Initial
AuthStateis null - Removed
isPendingfromAuthState - Default value for
originalUriis null
- Initial
- #127 Moves @okta/okta-auth-js from dependencies list to peerDependencies
- #122 Locks the SDK with installed okta-auth-js major version
- #105 Catches and displays errors in
LoginCallback
- #104 Adds support for
onAuthResumetoLoginCallbackforinteraction_requiredOAuth errors (requires okta-auth-js 4.8+)
- #71 Adds required prop
restoreOriginalUritoSecuritythat will overriderestoreOriginalUricallback ofoktaAuth
- #56 Fixes
basenameduplication on navigate from callback route.
- #56
OktaContext::OnAuthRequiredFunctionreturn type is updated toPromise<void> | void
- #8 See MIGRATING for detailed information.
- Replaces
authServicewith instance of@okta/okta-auth-jsso all configuration options and public methods are available. - By default
isAuthenticatedwill be true if both accessToken and idToken are valid - Changes
@okta/okta-auth-jsas peerDependency
- Replaces
- #8 Accepts
onAuthRequiredprop inSecureRoutecomponent to override the existing callback for the route - #39 Exposes ES module bundle from package
modulefield - #44 Adds support for Typescript
- #36 fixes issue with
SecureRoutethat caused multiple calls tologin()
- #17 fixes
authState.isPendingissue in login/logout process
- Upgrades internal dependencies
- #903 fixes SecureRoute to not require authentication unless the route matches
- #884 Stores
secureReferrerPathin sessionStorage to avoid race condition for multiple tabs
- #872 Adjusts
<SecureRoute>so that it enforces authentication requirement for components passed via "render" or "children" in addition to "component"- NOTE:
<SecureRoute>, like react-router<Route>, only wants ONE of the three ways of passing wrapped components per route - This should also address cases where components loaded through SecureRoute were being unnecessarily unmounted/remounted
- NOTE:
- #848 Removes
onSessionExpiredbehavior.
- #826 Fix stale
authStatein React context by listening onexpiredevent fromauthJs.tokenManager, then update theauthStatein context properly.
- [#802]
- The minimum version of okta-auth-js is updated to 3.1.2 from 3.0.0 to help address an issue with overlapping PKCE renewal requests.
<SecureRoute>should now pass the same react-router properties to wrapped components that<Route>does.- Passing custom props to a component using the
renderproperty of<SecureRoute>should now work
- [#738]
<LoginCallback/>now accepts an optionalerrorComponentprop that accepts a component that can be passed anerrorobject.- By default
<LoginCallback/>will render with the<OktaError/>component
- By default
<LoginCallback>now triggers only afterauthState.isPendingis false, removing the problem of as error message from parsing the tokens from the url being cleared by the pendingauthStatedetermination. See #719- [#738]
<Security>now memoizes if it creates an instance ofAuthServiceso as to not create new instances on re-renders
- Uses/requires @okta/okta-auth-js 3.x
- Notably, this means
pkcenow defaults totrue- See the @okta/okta-auth-js README regarding PKCE OAuth2 Flow for requirements
- The settings for the Application on your Okta Admin Dashboard must include allowing PKCE
- If you are using the (previous default) Implicit Flow, you should set
pkce: false
- Notably, this means
<Security>no longer creates a<div>wrapper around its children- The
classNameproperty of<Security>is no longer used - Existing applications that rely on this
<div>can add it themselves as a parent or direct child of<Security>
- The
- #700 LoginCallback: render error as string
- Now offers synchronous access to the authentication state (after the first asynchronous determination)
- Now offers the following React Hook (2.x requires React 16.8+)
useOktaAuth
- Now can be used with other routers than react-router
- React Router 5 continues to be supported, but is now optional
- Routers other than React-Router will have to write their own version of
LoginCallbackcomponent
- Requires React 16.8+
- If using react-router, requires react-router 5+
- See the
Migration from 1.x to 2.0section of the README for details on migrating your applicationsAuth.jsand theauthparameter to<Security>have been renamed toAuthService.jsandauthService<ImplicitCallback>has been replaced with<LoginCallback>auth.IsAuthenticated()has been removed- instead use the
.isAuthenticatedproperty of theauthStateobject
- instead use the
withAuthhas been replaced withwithOktaAuth, which gives slightly different parameters- provides
authServiceinstead ofauth - also provides the
authStateobject
- provides
- the arguments passed to the optional
onAuthRequired()callback provided to the<Security>component have changed - error handling for authentication is now handled by putting the error into the
authState.errorproperty auth.setFromUri()is nowauthService.setFromUri()and is passed a string (instead of an object)auth.getFromUri()is nowauthService.getFromUri()and returns a string (instead of an object)
- #669 - Fixes ImplicitCallback component so it will not attempt redirect unless
getFromUrireturns a value. This can occur if multiple instances of the component are mounted.
- #648
- Adds a default handler for onSessionExpired
- Adds a new option isAuthenticated which works with onAuthRequired
- Expose TokenManager
- Adds documentation for postLogoutRedirectUri
3b95ed- Changes from deprecated 'componentWillMount' to 'componentDidMount'
a2a7b3e- Configuration propertyscope(string) is deprecated in favor ofscopes(array).
a2a7b3e- Normalize config format for the propertiesresponseTypeandscopes, used in get token flows. Fully support deprecated config propertiesrequest_typeandscopeas previously documented and used within the okta-react samples.
0453f1d- Adds support for PKCE flow
654550- All configuration options are now accepted. See Configuration Reference. Camel-case (clientId) is now the preferred syntax for all Okta OIDC libraries. Underscore syntax (client_id) will be deprecated in a future release.
- internal version
2ae1eff- Adds TokenManager configuration parameters.
2945461- Updates@okta/configuration-validationversion.
6242f2d- Fixes an issue where the library was not correctly building the/distoutput before publishing tonpm.
4fcbdea- Adds configuration validation forissuer,client_id, andredirect_uriwhen passed into the security component.
c8b7ab5a- Migrate dependencies to project root utilizing yarn workspaces.
dbfb7de- Fixes an issue where the library would enter an error state when attempting to renew expired tokens (errorCode:login_required).
30fbdd2- AddsclassNameprop toSecuritycomponent to allow style overrides.5603c1f- Allow additional OAuth 2.0 and OpenID request params to be passed inloginandredirectmethods.fd42b01- Allow route params to be passed through theSecureRouterinto a nestedRoute.
- Updated
@okta/okta-auth-jsdependency to version 2.