Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[App Check] Replace token refresh NSNotifications with delegate #11524

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

andrewheard
Copy link
Contributor

Replaced token refresh notifications via NSNotificationCenter with GACAppCheckTokenDelegate in the internal App Check SDK.

Firebase App Check (shim SDK) can continue to support the existing NSNotifications by providing a GACAppCheckTokenDelegate that posts notifications in its tokenDidUpdate:instanceName: method.

#no-changelog

@google-oss-bot

This comment was marked as resolved.

@@ -48,6 +37,7 @@ NS_SWIFT_NAME(InternalAppCheck)
- (instancetype)initWithInstanceName:(NSString *)instanceName
appCheckProvider:(id<GACAppCheckProvider>)appCheckProvider
settings:(id<GACAppCheckSettingsProtocol>)settings
tokenDelegate:(id<GACAppCheckTokenDelegate>)tokenDelegate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't there a corresponding change to FirebaseAppCheck?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't finished turning FIRAppCheck into a shim yet and that's the only class in Firebase App Check that would be impacted by this change. (The refactor became too large when I tried to do this all in one.)

@andrewheard andrewheard marked this pull request as ready for review July 11, 2023 13:32
@andrewheard andrewheard merged commit a9b3ff1 into appcheck-lite Jul 11, 2023
33 checks passed
@andrewheard andrewheard deleted the ah/appcheck-lite-notifications branch July 11, 2023 13:32
andrewheard added a commit that referenced this pull request Jul 20, 2023
…1524)

Replaced token refresh notifications via `NSNotificationCenter` with `GACAppCheckTokenDelegate` in the internal App Check SDK.

Firebase App Check (shim SDK) can continue to support the existing `NSNotification`s by providing a `GACAppCheckTokenDelegate` that posts notifications in its `tokenDidUpdate:instanceName:` method.
@firebase firebase locked and limited conversation to collaborators Aug 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants