react-native-nitro-auth 0.5.7 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +295 -906
  3. package/android/src/main/java/com/auth/AuthAdapter.kt +22 -6
  4. package/cpp/HybridAuth.cpp +175 -39
  5. package/cpp/HybridAuth.hpp +2 -0
  6. package/ios/AuthAdapter.swift +2 -2
  7. package/lib/commonjs/Auth.web.js +141 -73
  8. package/lib/commonjs/Auth.web.js.map +1 -1
  9. package/lib/commonjs/create-auth-service.js +71 -0
  10. package/lib/commonjs/create-auth-service.js.map +1 -0
  11. package/lib/commonjs/service.js +2 -79
  12. package/lib/commonjs/service.js.map +1 -1
  13. package/lib/commonjs/service.web.js +2 -79
  14. package/lib/commonjs/service.web.js.map +1 -1
  15. package/lib/commonjs/use-auth.js +6 -3
  16. package/lib/commonjs/use-auth.js.map +1 -1
  17. package/lib/commonjs/utils/auth-error.js +8 -1
  18. package/lib/commonjs/utils/auth-error.js.map +1 -1
  19. package/lib/module/Auth.web.js +141 -73
  20. package/lib/module/Auth.web.js.map +1 -1
  21. package/lib/module/create-auth-service.js +67 -0
  22. package/lib/module/create-auth-service.js.map +1 -0
  23. package/lib/module/service.js +2 -79
  24. package/lib/module/service.js.map +1 -1
  25. package/lib/module/service.web.js +2 -79
  26. package/lib/module/service.web.js.map +1 -1
  27. package/lib/module/use-auth.js +6 -3
  28. package/lib/module/use-auth.js.map +1 -1
  29. package/lib/module/utils/auth-error.js +8 -1
  30. package/lib/module/utils/auth-error.js.map +1 -1
  31. package/lib/typescript/commonjs/Auth.web.d.ts +4 -2
  32. package/lib/typescript/commonjs/Auth.web.d.ts.map +1 -1
  33. package/lib/typescript/commonjs/create-auth-service.d.ts +5 -0
  34. package/lib/typescript/commonjs/create-auth-service.d.ts.map +1 -0
  35. package/lib/typescript/commonjs/service.d.ts.map +1 -1
  36. package/lib/typescript/commonjs/service.web.d.ts.map +1 -1
  37. package/lib/typescript/commonjs/use-auth.d.ts.map +1 -1
  38. package/lib/typescript/commonjs/utils/auth-error.d.ts.map +1 -1
  39. package/lib/typescript/module/Auth.web.d.ts +4 -2
  40. package/lib/typescript/module/Auth.web.d.ts.map +1 -1
  41. package/lib/typescript/module/create-auth-service.d.ts +5 -0
  42. package/lib/typescript/module/create-auth-service.d.ts.map +1 -0
  43. package/lib/typescript/module/service.d.ts.map +1 -1
  44. package/lib/typescript/module/service.web.d.ts.map +1 -1
  45. package/lib/typescript/module/use-auth.d.ts.map +1 -1
  46. package/lib/typescript/module/utils/auth-error.d.ts.map +1 -1
  47. package/package.json +12 -9
  48. package/react-native-nitro-auth.podspec +1 -0
  49. package/src/Auth.web.ts +261 -102
  50. package/src/create-auth-service.ts +97 -0
  51. package/src/service.ts +3 -101
  52. package/src/service.web.ts +3 -101
  53. package/src/use-auth.ts +7 -3
  54. package/src/utils/auth-error.ts +10 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,33 @@
1
+ # Changelog
2
+
3
+ ## 0.5.9 - 2026-04-24
4
+
5
+ ### Added
6
+
7
+ - Added shared JS service factory coverage and logger behavior tests.
8
+ - Added C++ coverage support with `test:cpp:coverage` and expanded native tests for session restore, token refresh, access-token fallback, scope updates, listener isolation, logout cancellation, and serializer behavior.
9
+ - Added example-app smoke checks for the public auth API, provider support, platform-gated behavior, and session-dependent methods.
10
+
11
+ ### Changed
12
+
13
+ - Updated Expo SDK 55 patch dependencies, React Native 0.83.6, Nitro Modules 0.35.5, and related build tooling.
14
+ - Refactored native/web `AuthService` creation so native and web error mapping stay consistent.
15
+ - Hardened web OAuth state, cache parsing, token refresh, and provider error handling.
16
+ - Improved example app handling for unsupported providers and unavailable session actions.
17
+ - Improved release validation to include JS and C++ coverage gates and a faster publish dry run path.
18
+
19
+ ### Fixed
20
+
21
+ - Fixed native runtime crashes in the example app when optional Nitro methods are not available on the installed native object.
22
+ - Fixed startup `silentRestore()` errors in the example app so restore failures surface in status instead of becoming unhandled promises.
23
+ - Excluded C++ test sources from the iOS pod target to avoid app-target duplicate `main` symbols.
24
+
25
+ ### Verified
26
+
27
+ - `bun run check:ci`
28
+ - `bun run --cwd packages/react-native-nitro-auth test:coverage -- --runInBand`
29
+ - `bun run --cwd packages/react-native-nitro-auth test:cpp:coverage`
30
+ - `bun run publish-package:dry-run`
31
+ - `bun run example:prebuild`
32
+ - `bun run example:android`
33
+ - `bun run example:ios`