- #172 Adds
errorComponent
prop toSecureRoute
to handle internalhandleLogin
related errors
- #159 Updates internal dependency
- #67 Adds
loadingElement
prop toLoginCallback
component
- #146 Fixed TypeScript definitions
- #112 Only unsubscribe the
AuthStateManager
handler 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
AuthState
is null - Removed
isPending
fromAuthState
- Default value for
originalUri
is 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
onAuthResume
toLoginCallback
forinteraction_required
OAuth errors (requires okta-auth-js 4.8+)
- #71 Adds required prop
restoreOriginalUri
toSecurity
that will overriderestoreOriginalUri
callback ofoktaAuth
- #56 Fixes
basename
duplication on navigate from callback route.
- #56
OktaContext::OnAuthRequiredFunction
return type is updated toPromise<void> | void
- #8 See MIGRATING for detailed information.
- Replaces
authService
with instance of@okta/okta-auth-js
so all configuration options and public methods are available. - By default
isAuthenticated
will be true if both accessToken and idToken are valid - Changes
@okta/okta-auth-js
as peerDependency
- Replaces
- #8 Accepts
onAuthRequired
prop inSecureRoute
component to override the existing callback for the route - #39 Exposes ES module bundle from package
module
field - #44 Adds support for Typescript
- #36 fixes issue with
SecureRoute
that caused multiple calls tologin()
- #17 fixes
authState.isPending
issue in login/logout process
- Upgrades internal dependencies
- #903 fixes SecureRoute to not require authentication unless the route matches
- #884 Stores
secureReferrerPath
in 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
onSessionExpired
behavior.
- #826 Fix stale
authState
in React context by listening onexpired
event fromauthJs.tokenManager
, then update theauthState
in 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
render
property of<SecureRoute>
should now work
- [#738]
<LoginCallback/>
now accepts an optionalerrorComponent
prop that accepts a component that can be passed anerror
object.- By default
<LoginCallback/>
will render with the<OktaError/>
component
- By default
<LoginCallback>
now triggers only afterauthState.isPending
is false, removing the problem of as error message from parsing the tokens from the url being cleared by the pendingauthState
determination. See #719- [#738]
<Security>
now memoizes if it creates an instance ofAuthService
so as to not create new instances on re-renders
- Uses/requires @okta/okta-auth-js 3.x
- Notably, this means
pkce
now 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
className
property 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
LoginCallback
component
- Requires React 16.8+
- If using react-router, requires react-router 5+
- See the
Migration from 1.x to 2.0
section of the README for details on migrating your applicationsAuth.js
and theauth
parameter to<Security>
have been renamed toAuthService.js
andauthService
<ImplicitCallback>
has been replaced with<LoginCallback>
auth.IsAuthenticated()
has been removed- instead use the
.isAuthenticated
property of theauthState
object
- instead use the
withAuth
has been replaced withwithOktaAuth
, which gives slightly different parameters- provides
authService
instead ofauth
- also provides the
authState
object
- 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.error
property 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
getFromUri
returns 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'
558696
- Upgrades to@okta/[email protected]
which includes new options for signout:3e8c65
a2a7b3e
- Configuration propertyscope
(string) is deprecated in favor ofscopes
(array).
a2a7b3e
- Normalize config format for the propertiesresponseType
andscopes
, used in get token flows. Fully support deprecated config propertiesrequest_type
andscope
as 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-validation
version.
6242f2d
- Fixes an issue where the library was not correctly building the/dist
output before publishing tonpm
.
4fcbdea
- Adds configuration validation forissuer
,client_id
, andredirect_uri
when 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
- AddsclassName
prop toSecurity
component to allow style overrides.5603c1f
- Allow additional OAuth 2.0 and OpenID request params to be passed inlogin
andredirect
methods.fd42b01
- Allow route params to be passed through theSecureRouter
into a nestedRoute
.
- Updated
@okta/okta-auth-js
dependency to version 2.