Repository navigation
Releases
v0.14.3
Fixes three web session bugs and documents how token refresh works on web.
Breaking changes
- None.
Changes
- Web:
silentRestore()after a login no longer drops the in-memory tokens when token persistence is off. - Web: a session is restored as one whole session, so tokens from one tab are never paired with the expiry or scopes of another.
- Web: after browser storage rejects a write, the newer in-memory value is read first.
- Web: a duplicate
login()rejected withoperation_in_progressno longer emitslogin_failed. - Docs: a Google
refreshToken()on web opens a popup and needs a user gesture;silentRestore()never opens UI. - Tested on Expo SDK 58.0.26, React Native 0.88.1 and React 19.3.0. Peer ranges are unchanged.
Full notes: CHANGELOG
v0.14.2
Moves the development and example baseline to the latest Expo SDK 58, React Native and Nitro patch releases.
Breaking changes
- None.
Changes
- Tested on Expo SDK 58.0.23, React Native 0.88.1 and
react-native-nitro-modules0.37.2. - Nitro bindings are regenerated with Nitrogen
0.37.2. The generated iOS Swift drops an unused recycling check for the auth adapter and uses the new C++ part check. - Peer ranges are unchanged.
Full notes: CHANGELOG
v0.14.1
Fixes web refresh-token loss after silent restore, web storage and insecure-context failures, Microsoft per-login tenants, and Apple session handoff on iOS.
Breaking changes
- None.
Changes
- Web
silentRestore()keeps the in-memory Microsoft refresh token, so later refreshes work. - Web logins survive browser-storage write failures and report
configuration_errorin insecure contexts. - Web scope requests and Google refresh reject a different account with
invalid_state. - Microsoft refresh and scope upgrades keep the tenant used at login on web, Android and iOS.
- iOS Apple sign-in clears older Google and Microsoft sessions; the config plugin removes the Apple entitlement when
appleSignInisfalse. - Native
refresh_failedevents include the provider;user.scopesis unset after revoking all scopes. - The Microsoft social button supports
appearanceandshape. - Tested with Expo SDK 58 (React Native 0.88.0).
Full notes: CHANGELOG
v0.14.0
This release adds AuthService.createNonce(), gives clearer error codes, and makes the Expo plugin and Google and Microsoft sessions more reliable.
Breaking changes
- The Expo config plugin now rejects unknown or mistyped options at
expo prebuild. Remove or correct the option named in the error. - Many failures now use specific
AuthError.codevalues, notunknownornetwork_error. Switch on the new codes. Android Google refresh now reportsnot_signed_in; send those users throughlogin("google"). - Web: default
login("microsoft")now requestsoffline_access, and a login with no refresh token drops the old one.
Changes
- New
AuthService.createNonce()returns a raw and SHA-256 hex nonce pair on iOS, Android and web. - Android: Credential Manager Google refresh is non-interactive and needs a foreground Activity. If UI is needed, it rejects with
refresh_failedand keeps the session. - Android: Google status codes map the same way for login,
requestScopes()and legacy refresh. - iOS: signing in with Google or Microsoft clears the other provider's session. Apple sign-in clears neither.
- iOS:
requestScopes()with granted scopes resolves with the current user. An expired Google refresh token reportsinteraction_required. - Web fixes: no "undefined Doe" Apple names, logout clears the Microsoft refresh token, and code exchange maps network failures to
network_error. - Expo plugin: a later
expo prebuildremoves only theInfo.plistkeys and URL schemes the plugin wrote. GoogleSignInnow requires~> 9.2, and Androidplay-services-authis21.6.0.
Full notes: CHANGELOG
v0.13.2
Breaking changes
None.
Fixed
- Web: a refresh from an earlier session cannot overwrite a new login.
Refresh rejects withoperation_in_progresswhile an interactive session
operation is pending, and logout still cancels a login started in the same turn. - Web: a refresh cancelled by login,
requestScopes, or logout rejects without
emitting arefresh_failedauth event, matching iOS and Android. - iOS and web: Apple sign-in respects an explicit empty
scopeslist instead
of requesting name and email. Omitted scopes retain the existing defaults. - Clarify that web provider sign-in uses Expo configuration through
expo-constants; the package has no separate plain-browser configuration API.
v0.13.1
Breaking changes
None.
Fixed
- Android: a Google ID token whose
expclaim is too large to represent in milliseconds no longer produces a wrapped, incorrectexpirationTime. The expiry is reported as absent. - Android: a Microsoft token response with an out-of-range
expires_inno longer produces a wrapped, incorrectexpirationTime. The expiry is reported as absent, as it already was for zero or negative values. - iOS and Android: JWT payload decoding no longer relies on signed-integer shift behavior, and the native decoder rejects payloads larger than
INT_MAXbytes instead of returning a truncated length. Real tokens decode as before. - iOS: an ID token whose payload is not valid UTF-8, or contains a NUL byte, yields no claims, as on Android. A Microsoft or nonce-bound sign-in with such a token fails with
invalid_nonceinstead of using altered claim text. - iOS: Microsoft sign-in falls back to the
emailclaim whenpreferred_usernameis present but empty, as on Android. - iOS: a Microsoft sign-in is reported as
cancelledonly when the web authentication session reports a user cancel. An unrelated error with the same numeric code is reported asnetwork_errororunknown. - iOS: when Microsoft returns an
errorwithout anerror_description, the error detail is the provider error code, as on Android. - Android:
null, array, and object ID-token claims are ignored instead of being turned into text, so anullemail or name is no longer reported as the string"null". - The error contract documents that a native error detail is cut at a NUL byte, and how iOS and Android differ when a provider gives no usable token expiry.
- The README explains that compileSdk
35and Android Gradle Plugin8.6are minimums set by AndroidX Credentials1.6.0, and that the library's compileSdk36, targetSdk36, and minSdk24defaults apply only when the app sets none.
v0.13.0
Breaking changes
-
react-native-svgis now an optional peer dependency (>=15.8.0) instead of a pinned15.15.5dependency, and SVG button artwork moved to a new subpath.react-native-nitro-auth/official-buttonsrenders PNG artwork only and accepts onlyrenderMode="image"; it no longer loadsreact-native-svgor the inlined SVG artwork.Migration: if you render
renderMode="svg", installreact-native-svg(bunx expo install react-native-svg) and importOfficialSocialButtonfromreact-native-nitro-auth/official-buttons/svg. That export defaults torenderMode="svg"and also accepts"image". Image-mode buttons need no change. -
expo-build-propertiesis no longer a dependency. The config plugin now writes the Google Sign-In modular-header pods intoapple.extraPodsthroughwithPodfilePropertiesand leaves every other Podfile property unchanged.Migration: if your
app.configlistsexpo-build-propertiesinplugins, add it to your own dependencies withbunx expo install expo-build-properties. If you also setios.extraPodsthere, listreact-native-nitro-authbeforeexpo-build-propertiesinplugins, or addAppCheckCore,GoogleUtilities, andRecaptchaInteropwithmodular_headers: trueto that list. -
The
react-nativepeer range is now>=0.77.0, the minimum thatreact-native-nitro-modules0.37builds on (its Android module does not compile against React Native0.76).expo >=53.0.0is an optional peer used only by the config plugin.Migration: upgrade React Native
0.75/0.76apps to0.77or later (Expo SDK53or later) before installing this release. -
On iOS and Android,
refreshToken()and a near-expirygetAccessToken()reject withoperation_in_progresswhile alogin(),requestScopes(),silentRestore(), orrevokeAccess()is pending. Before this release, the refresh cancelled that operation.Migration: if you call
refreshToken()orgetAccessToken()during sign-in, account switching, scope consent, startup restore, or access revocation, catchoperation_in_progressand retry after the pending operation settles. -
The Android library manifest no longer gives
MicrosoftAuthActivitya scheme-onlymsauthintent filter, so apps no longer claim everymsauth://URL on the device.Migration: Expo apps need no change; the plugin registers
msauth://${applicationId}/<microsoftClientId>with the manifest placeholder, soapplicationIdSuffixand product flavors get a matching host. Bare Android apps that use Microsoft login must add that intent filter tocom.auth.MicrosoftAuthActivityin their manifest, as shown in the README's "Microsoft redirect URIs" section. -
On web, provider errors now map through the shared OAuth table used by iOS and Android.
invalid_grantorinvalid_tokenduring login maps totoken_error(it wasrefresh_failed), and provider messages that only contain an error code as a substring map tounknown.Migration: callers that branch on
refresh_failedafter a web login failure should branch ontoken_error.
Added
react-native-nitro-auth/official-buttons/svgsubpath with the SVGOfficialSocialButton.- README sections for Microsoft redirect URIs (Android
msauth://<applicationId>/<microsoftClientId>, iOSmsauth.<bundleIdentifier>://auth) and React Native / Expo compatibility.
Changed
- The iOS podspec uses React Native's
min_ios_version_supportedinstead of iOS16.4, so default React Native0.77–0.86and Expo SDK53–55apps (iOS15.1) can install the pod. Its git source uses thev-prefixed release tag. - Android dependencies no longer require compileSdk
36and Android Gradle Plugin8.9.1:androidx.activity:activity-ktxis1.10.1andandroidx.browser:browseris1.8.0.androidx.credentials1.6.0andgoogleid1.2.0are unchanged. The Android requirements are compileSdk35, Android Gradle Plugin8.6, and Kotlin2.0or later. The package no longer pinskotlin-stdlib; the host Kotlin version applies. - Android Credential Manager Google sessions report the ID token's
hdclaim ashostedDomain, falling back to the requested value. - The config plugin loads
expo/config-pluginsinstead of@expo/config-plugins.
Fixed
- A native token refresh no longer cancels an in-flight login, scope request, or session restore.
- iOS
forceAccountPickeranduseSheetsign out of the local Google session instead of revoking the app's Google grant. - iOS returns
undefinedinstead of""for absent user fields and tokens, matching Android. An iOS refresh no longer overwrites stored tokens with empty strings. - iOS clears the in-memory Microsoft refresh token after a 4xx refresh response, like Android, so later
silentRestore()calls resolve without a session instead of failing withrefresh_failed. On both platforms,408and429responses keep the refresh token. - The iOS Microsoft callback checks
statebefore it reads provider errors. loginAndGetUser()returns the samescopesvalue ascurrentUserwhen no scopes were granted.- Web: a login cancelled by
logout()no longer clears the guard of a login started in the same tick, andlogout()anddispose()close the provider popup and stop its timers. - Web: Apple JS SDK rejections such as
{ error: "popup_closed_by_user" }and{ error: "user_cancelled_authorize" }map tocancelledinstead ofunknown. useAuth().loadingstaystrueuntil every hook operation settles; a rejected duplicate call no longer clears it while the first call runs.- The web entry binds
useAuthto the web service, so bundlers that ignore.webfile resolution no longer load the Nitro service on web. - The config plugin rewrites the Microsoft Android activity filter on every prebuild, removes it and the Microsoft and Google string resources when their options are removed, no longer calls the missing
AndroidConfig.Package.getPackageName, and does not write anmsauth.undefinedURL scheme whenios.bundleIdentifieris missing. - The Android Apple
nonceformat (64-character lowercase SHA-256 hex) is documented in the README and theAppleAndroidLoginOptionstype. - The shipped Google Sans OFL notice names the font's own copyright holder.
- SECURITY.md directs reports to GitHub private vulnerability reporting instead of public issues.
- Documentation no longer describes a custom web storage adapter. It was never reachable from the public API;
nitroAuthPersistTokensOnWebdefaults tofalse.
v0.11.3
Breaking changes
- None.
Fixed
- Web cache restoration removes stored credential and profile fields when their persistence policies are disabled. Failed storage cleanup leaves the in-memory session sanitized and emits credential-safe diagnostics.
- Restricted browser storage getters now fall back to memory instead of crashing initialization.
- Apple web SDK loading now times out after 15 seconds and can retry failed loads without reusing failed package-owned scripts. Concurrent requests share loading, and cancellation prevents a late load from starting sign-in.
v0.11.2
[0.11.2] - 2026-09-24
Breaking changes
- None.
Fixed
- Android decodes Microsoft ID token claims from UTF-8 bytes without passing
decoded payloads through JNI strings. Unicode claims remain intact, and
malformed UTF-8 claims are rejected.
v0.11.1
Breaking changes
- None.
Added
- Hidden example credentials lab at
auth://e2e-credentialsfor nonce,
capability, and snapshot coverage without live OAuth.
Changed
- The example Expo pin follows SDK 57.0.24 (
expo-doctor/expo install --check).
React Native stays0.86.3. - The example iOS host uses a
SceneDelegateso the app can present a window on
iOS 27 physical devices. - The example leaves
ios.appleSignInoff unlessNITRO_AUTH_APPLE_SIGN_IN=1,
so a free personal team can install on a physical iPhone. Live Apple Sign-In
still needs a paid Apple Developer team. - Native nonce hashing and JWT payload splits share
cpp/AuthCrypto.cpp
(SHA-256 hex + base64url). Signatures are still not verified. See
docs/native-libraries.md.