Skip to content

Conversation

@gabriel
Copy link

@gabriel gabriel commented Dec 26, 2025

This pull request refactors the AppleAuth::Token class to make it more flexible and testable by allowing a custom configuration object to be passed in, rather than relying on a global configuration. All internal references to configuration values have been updated to use the instance-specific config object.

Configuration injection and usage:

  • The AppleAuth::Token initializer now accepts a config: keyword argument, defaulting to AppleAuth.config, and stores it as an instance variable. All internal references to configuration values (such as apple_client_id, apple_team_id, redirect_uri, apple_key_id, and apple_private_key) now use this instance variable instead of the global config. [1] [2] [3] [4] [5]

Code improvements:

  • Improved type checking for the private key by replacing a direct class comparison with is_a?, making the code more idiomatic and robust.### Summary

Other Information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant