-
Notifications
You must be signed in to change notification settings - Fork 6
💡 Token Hash #85
codefiesta
started this conversation in
Ideas
💡 Token Hash
#85
-
I'm wondering if it would be valuable to provide an observable hash of Providers and their respective Authorization tokens for easy access to multiple tokens inside the OAuth object:
@Observable class OAuth { public var authorizations: [Provider: Authorization] = [:] }
Or, change the OAuth.State.authorized state from a single authorization to an accumulated hash of multiple authorizations:
/// Current implementation (single) case authorized(Provider, Authorization) /// Proposed change (multiple) case authorized([Provider: Authorization])
This could allow applications to easily authenticate with multiple providers and stay in line with the current observer pattern. The first option wouldn't be a breaking change, however it could make for messier implementations for developers of knowing what to truly observe and react to.
Obviously changing the state signature would be a breaking change.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment