Converted from an Android-only library to a Kotlin Multiplatform module (Android + JVM). This is a major release with breaking changes to the credential-event and cache APIs.
- Module artifact shape changed from a single Android AAR to a KMP artifact (Android + JVM
variants). Consumers pulling
auth-foundationdirectly (not via a flow module) may need to re-resolve dependencies. Cacheinterface gained a new abstractclear()method with no default implementation — any customCacheimplementation must add it to keep compiling.NoOpCachechanged from public to internal.CredentialCreatedEvent,CredentialDeletedEvent,CredentialStoredAfterRemovedEvent,CredentialStoredEvent, andDefaultCredentialChangedEvent:getCredential(): Credentialremoved, replaced bygetCredentialIdentifier(): CredentialIdentifier.NoAccessTokenAvailableEvent.getCredential()return type changed fromCredentialtoCredentialIdentifier.CredentialStoredEvent.getToken()return type changed fromTokentoTokenInfo?(now nullable).JwtParser.Companion.create()— the only public factory forJwtParser— removed.CoalescingOrchestratorchanged from public to internal.com.okta.authfoundation.api.http.log.AuthFoundationLogger/LogLevelrelocated tocom.okta.authfoundation.api.log.*.@InternalAuthFoundationApi-annotatedAesEncryptionHandler.encryptStringandAndroidKeystoreUtil.getOrCreateAesKeysignatures changed to returnResult(lower real-world impact, but a binary break for anyone using the internal API).ClaimsProvider.audiencereturn type changed fromString?toList<String>?, since per RFC 7519 §4.1.3 / OIDC Core 1.0 §3.1.3.7 theaudclaim may be either a single string or a JSON array of strings (#414).Credential.scope()return type changed fromStringtoList<String>; the redundantCredential.scopes(): List<String>accessor was removed (merged intoscope()).OAuth2ClientConfiguration.defaultScopereturn type changed fromStringtoList<String>.
- KMP
OAuth2Client,OAuth2ClientBuilder,OAuth2ClientConfiguration,OAuth2EndpointOverrides(#379, #380, #383, #398). - Cross-platform credential management:
TokenCredentialManager, KMPCredential,CredentialIdentifier,TokenData/TokenInfo,TokenMetadata(#381). - Room-based KMP persistent storage with pluggable encryption (
RoomTokenStorage,TokenEncryptionHandler) (#382). - Cross-platform User-Agent header and ID token validation (#384).
- KMP crypto abstraction,
PkceGenerator, URL utilities,BrowserRedirectHandler(#387). - HTTP-date parsing in
parseRetryAfterHeaderper RFC 7231 §7.1.3 (#388). - EC key JWT validation,
refreshTokenextra params, custom endpoint overrides viaOAuth2EndpointOverrides(#398). - Biometric authentication support for the KMP credential path (#405).
- Typed rate-limit retry configuration (
RateLimitRetryConfig,MaxRetries,MinDelaySeconds,rateLimitRetryCallbackon the builder), replacing the mutableEventCoordinator-based retry config on the KMP path (#407, #408). - New event categories:
CredentialEvent/TokenEventmarker interfaces, plus newTokenRefreshedEvent,TokenRevokedEvent,RateLimitException(#407). - ABI validation (KGP native for the jvm target,
android-bcv-bridgefor the android target) rolled out (#411). - Deprecated the Android-only APIs (
OidcConfiguration,OAuth2Client.default, AndroidCredential,com.okta.oauth2.*) in favor of the KMP equivalents, with migration guidance inauth-foundation/README.md. - ID token validation (Android and KMP
DefaultIdTokenValidator) now accepts theaudclaim as either a single string or a JSON array, checking that the client ID is contained in the audience list rather than requiring an exact string match (#414).
- NPE when
getCertificate()returns null inTokenEncryptionHandler(#402). - Uncaught
ProviderExceptioninAndroidKeystoreUtil.getOrCreateAesKey(#403). CoalescingOrchestratorreimplemented withMutexinstead ofsynchronized, removing a thread-blocking lock inside suspend functions (#400).
- Removed the
String-scope overloads ofstart(...)onAuthorizationCodeFlow,DeviceAuthorizationFlow,ResourceOwnerFlow,SessionTokenFlow, andTokenExchangeFlow— scopes must now be passed asList<String>. - Reordered the
scope/extra-params parameters inAuthorizationCodeFlow.startandSessionTokenFlow.start(scope now precedes the extra-params map), affecting positional (non-named-argument) call sites. - All six KMP flow interfaces (
AuthorizationCodeFlow,DeviceAuthorizationFlow,RedirectEndSessionFlow,ResourceOwnerFlow,SessionTokenFlow,TokenExchangeFlow) gained a new abstractgetClient(): OAuth2Clientaccessor — any custom implementation of these interfaces must add it to keep compiling.
- Entire
com.okta.oauth2.kmppackage: KMPResourceOwnerFlow,DeviceAuthorizationFlow,TokenExchangeFlow,AuthorizationCodeFlow,SessionTokenFlow,RedirectEndSessionFlow(#389–#394). - Java-compatible
CompletableFuturewrappers for all six flows undercom.okta.oauth2.kmp.jvm(#395, #404). LocalhostBrowserRedirectHandlerand other KMP crypto/URL utilities for JVM browser redirects (#387).- Android compat extensions bridging the new KMP flows to existing Android call sites (#395).
- Scopes are requested as
List<String>onAuthorizationCodeFlow,DeviceAuthorizationFlow,ResourceOwnerFlow,SessionTokenFlow, andTokenExchangeFlow(RedirectEndSessionFlowhas no scope parameter). - Public
getClient(): OAuth2Clientaccessor on all six KMP flow interfaces. - ABI validation rolled out for both the jvm and android targets (#411).
- Deprecated the Android-only flow classes (
com.okta.oauth2.*) in favor ofcom.okta.oauth2.kmp.*, with migration guidance inoauth2/README.md.
- Module converted from an Android-only build to Kotlin Multiplatform (Android + JVM) (#386).
WebAuthentication.authorizationCodeFlowand.redirectEndSessionFlowchanged from publicvarproperties to internal, removing their public getters/setters (#406).- The
login(..., scope: List<String>, ...)overload added in #406 had itsscope/extra-params parameters reordered (scope now precedes the extra-params map) — source- and binary-incompatible for existing callers of that overload.
- New
WebAuthentication(OAuth2Client, WebAuthenticationProvider)constructor accepting the KMPOAuth2Client, added alongside the existing constructors (#406). - New
login(..., scope: List<String>, ...)overload alongside the existingStringoverload (#406). DefaultWebAuthenticationProvider(+ companion),WebAuthentication.FlowAlreadyInProgressException,events.UIEventmarker interface (#406, #407).- ABI validation rolled out (#411).
- Step-up redirect race condition in
DefaultRedirectCoordinator(#401).
- Internally now uses the KMP
AuthorizationCodeFlow; deprecated the Android-onlyOidcConfiguration-based path (#406). ForegroundActivityEvent/CustomizeBrowserEvent/CustomizeCustomTabsEventreparented under a newUIEventmarker interface — stillEventsubtypes, non-breaking (#407).
- Make SDK defaults configurable by third party SDKs #323
- Update dependencies
- Fix AEADBadTagException issues caused by corrupt encrypted files #313
- Fix default token migration from 1.x to 2.x #314
- Allow using accessToken if idToken is missing #315
This version exposes ApplicationContextHolder for use by okta-idx-android
This is a major version release with a number of breaking API changes and new features. Please check README.md changes under the above Commits link.
- See Migrating from okta-mobile-kotlin 1.x to 2.x for a full description of how to migrate.
- The SDK now includes first class support for Biometric encryption. See Biometric Credentials
- TokenStorage interface is redefined and reimplemented. If using a custom TokenStorage, please migrate it using Token Migration guide
- OAuth APIs are instantiated differently from before. Users no longer need to manage references to OidcClient for instantiating OAuth flows.
- Internally, EncryptedSharedPreferences have been removed from the SDK, and replaced with Room DB. Encryption is done using AndroidKeyStore primitives, and SQLCipher. Migration to the new storage is handled automatically for most cases.
- Jetpack startup has been removed from the SDK. This should resolve any startup initializer issues.
- DT cookie has been removed from this SDK. That will be moved to okta-idx-android instead.
- EventCoordinator events now subclass Event class. This should make it easier to find Events.
- Added state value customization to AuthorizationCodeFlow.start #278
- DeviceTokenProvider initialization issues have been mostly fixed. A possible crash can still be encountered in case of corrupt key in keystore #278
- Updated libraries across several commits: #269 #264
- Add optional debounce functionality to browser redirect cancellation: #263
- Reorder okhttp interceptors to prioritize user-defined interceptors #265
- Fix DT (device token) cookie formatting to fix "remember device" functionality in downstream SDKs. #260
- CredentialBootstrap.reset() is now publicly visible for easier testing. #258
- Fix issues with activity lifecycle destroying browser login state. #258
- Handle possible concurrent access to SharedTokenStorage. #256
- Added DT (device token) cookie to okHttpClient for supporting "remember device" functionality in downstream SDKs. #240
- Fix a race condition caused by activity lifecycle when multiple login/logout are called too quickly. #238
- Fix a potential race when writing exceptionPairs. #222
- Add revokeAllTokens to Credential. #201
- Add support for biometric backed storage. #207
- Add Credential.tokenStateFlow. #211
- Introduce CredentialStoredEvent. #212
- Add getOrThrow method to OidcClientResult. #213
- Expose an errorIdentifier for IdTokenValidator. #214
- Add rate limit handling for network requests. #215
- Added support for amr and acr claims #175
- Support for more OpenID Providers
- Support for Device Authorization Grant slow_down #186
- Added
errorIdtoAuthorizationCodeFlow.ResumeException#184
- Updated IdTokenValidator to include an object for validation parameters #181
SessionTokenFlowwhich aids migration from legacy Authn APIs.- Cache .well-known/openid-configuration results.
- Made most of
OidcConfigurationinternal, useAuthFoundationDefaultsfor customization. - Add extra parameters to the
DeviceAuthorizationFlow. - Remove the default on
Credential.revoke. - Expose
JwtParser.parseinstead ofOidcClient.parseJwt.
- Listen for configuration changes in
ForegroundActivity. - Fix missing slash in SDK version.
OidcClient.refreshno longer accepts scopes, as they are not used.- Changed the way id token validation customization happens.
- Made scope a string, rather than a set.
- Renamed metadata to tags.
- Fixed issues with non Chrome browsers.
- Eagerly error when launching a web based flow when an Activity is backgrounded.
- Properly support backgrounded internal Activities during web authentication.
- Legacy token migration - migrate tokens from okta-oidc-android, see migrate.md.
- Consumer proguard rules, allowing R8 including with full mode.
- Attempt to fix storage/crypto errors automatically.
- Emit an event when credentials are deleted.
- Added BOM to project.
- Added
CredentialBootstrap.oidcClientto preserve ease of use.
Credential.oidcClientis now an implementation detail, and not publicly accessible.- Minting tokens no longer automatically stores tokens, it's now an explicit action.
- Renamed
CredentialBootstrap.credentialtoCredentialBootstrap.defaultCredential.
- Fixed an issue where the chrome custom tab would linger after authentication.
- Added CredentialBootstrap for handling common
Credentialuse cases. - Added a tag to OkHttp requests with the associated
Credential.
- Simplified WebAuthenticationClient to return a Token in a single API call.
- Fixed an issue where a valid issuer might fail validation.
- Numerous bug fixes and improvements.
- Initial release!