Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e212492
Add offline JWT-based license validation system for React on Rails Pro
AbanoubGhadban Oct 8, 2025
e10775b
Add React on Rails Pro license file to .gitignore in multiple locations
AbanoubGhadban Oct 13, 2025
0d4c982
add needed licence rake tasks
AbanoubGhadban Oct 9, 2025
0f34eb2
Require exp field in license validation
AbanoubGhadban Oct 12, 2025
2f4a185
Add tests for required exp field validation
AbanoubGhadban Oct 12, 2025
4d6fe51
Require valid license in all environments (dev, test, prod)
AbanoubGhadban Oct 12, 2025
570b01b
Add license validation on startup for both Rails and Node renderer
AbanoubGhadban Oct 12, 2025
ea79463
Change license field from 'license_type' to 'plan' and add 'issued_by…
AbanoubGhadban Oct 12, 2025
c0586c1
Remove obsolete license key file from the dummy config
AbanoubGhadban Oct 12, 2025
76edca3
Add React on Rails Pro license file to .gitignore and Gemfile.lock
AbanoubGhadban Oct 12, 2025
5b74c1e
Fix require statement in license validator spec to use spec_helper
AbanoubGhadban Oct 12, 2025
7f2f088
update yarn.lock
AbanoubGhadban Oct 12, 2025
8f8e88c
Fix license validator spec by stubbing Rails.logger and Rails.root
AbanoubGhadban Oct 12, 2025
9650099
Fix Node.js license validator tests and disable auto-expiration check
AbanoubGhadban Oct 12, 2025
b11a3d9
Remove react_on_rails_pro_licence_valid? and consolidate to react_on_…
AbanoubGhadban Oct 13, 2025
7beeb5c
Make react_on_rails_pro? actively validate license and remove backwar…
AbanoubGhadban Oct 13, 2025
5deee18
Remove redundant 'before: :load_config_initializers' hook from licens…
AbanoubGhadban Oct 13, 2025
3e01f71
Rename validation methods to use ! convention for exception-throwing
AbanoubGhadban Oct 13, 2025
fed1c36
Update license public key documentation and source URL
AbanoubGhadban Oct 13, 2025
38ef270
Refactor license validation to remove unnecessary conditional logging
AbanoubGhadban Oct 13, 2025
5d6514f
Refactor LicensePublicKey module documentation for clarity and consis…
AbanoubGhadban Oct 13, 2025
ab9801c
Refactor LicenseValidator to simplify validation logic and remove unn…
AbanoubGhadban Oct 13, 2025
fca96e4
Refactor Node.js license validator from singleton class to functional…
AbanoubGhadban Oct 13, 2025
9299a24
Enhance license data structure and improve security in license valida…
AbanoubGhadban Oct 13, 2025
27e585c
Refactor validateLicense to void function for clearer API semantics
AbanoubGhadban Oct 13, 2025
37704eb
Enhance public key update task with local URL handling and add usage …
AbanoubGhadban Oct 13, 2025
4a895c2
Enhance ReactOnRailsHelper spec by mocking additional utility methods…
AbanoubGhadban Oct 13, 2025
6bd6eda
Enhance pro features context by allowing multiple message stubs for i…
AbanoubGhadban Oct 13, 2025
e1f167d
Enhance pro features context by adding support for RSC in immediate h…
AbanoubGhadban Oct 13, 2025
05739bb
fix TS problems
AbanoubGhadban Oct 13, 2025
9626ff2
Enhance license validation test by generating a separate key pair for…
AbanoubGhadban Oct 13, 2025
118b9f1
Refactor license claims in JWT to use standard 'iss' identifier and u…
AbanoubGhadban Oct 14, 2025
05b8615
Implement license expiration handling with a 1-month grace period for…
AbanoubGhadban Oct 14, 2025
278b8dc
Add license attribution comment and refactor license validation metho…
AbanoubGhadban Oct 14, 2025
5555b37
Refactor license validation methods to use 'validated_license_data!' …
AbanoubGhadban Oct 15, 2025
58d680e
Add tests for react_on_rails_attribution_comment to verify Pro and op…
AbanoubGhadban Oct 15, 2025
765cde1
Add tests for Pro and open source attribution comments in rendered ou…
AbanoubGhadban Oct 15, 2025
cf975c7
Add tests for single attribution comment inclusion in React on Rails …
AbanoubGhadban Oct 15, 2025
e480515
Refactor license evaluation logic and improve error handling for miss…
AbanoubGhadban Oct 15, 2025
8b49a7a
Remove unnecessary setup in pro_attribution_comment tests for cleaner…
AbanoubGhadban Oct 15, 2025
b63a704
Stub ReactOnRailsPro::Utils.pro_attribution_comment for consistent te…
AbanoubGhadban Oct 15, 2025
b9c0c5b
Update tests to expect HTML comments instead of script tags for React…
AbanoubGhadban Oct 15, 2025
125b364
Stub ReactOnRailsPro::Utils.pro_attribution_comment for consistent te…
AbanoubGhadban Oct 15, 2025
895d92a
Update documentation to clarify license usage and add HTML comment at…
AbanoubGhadban Oct 15, 2025
d5b43a0
Refactor license validation logic to use getValidatedLicenseData and …
AbanoubGhadban Oct 15, 2025
b083a65
Update grace period message format to use "day(s)" for consistency in…
AbanoubGhadban Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/react_on_rails/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ def rails_context(server_side: true)
i18nDefaultLocale: I18n.default_locale,
rorVersion: ReactOnRails::VERSION,
# TODO: v13 just use the version if existing
rorPro: ReactOnRails::Utils.react_on_rails_pro?
rorPro: ReactOnRails::Utils.react_on_rails_pro_licence_valid?
}

if ReactOnRails::Utils.react_on_rails_pro?
if ReactOnRails::Utils.react_on_rails_pro_licence_valid?
result[:rorProVersion] = ReactOnRails::Utils.react_on_rails_pro_version

if ReactOnRails::Utils.rsc_support_enabled?
Expand Down
3 changes: 3 additions & 0 deletions react_on_rails_pro/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ yalc.lock

# File Generated by ROR FS-based Registry
**/generated

# React on Rails Pro License Key
config/react_on_rails_pro_license.key
Loading
Loading