-
Notifications
You must be signed in to change notification settings - Fork 608
feat(appcheck): create FirebaseAppCheck.tokenChanges Flow #4806
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
Open
thatfiredev
wants to merge
2
commits into
main
Choose a base branch
from
rpf-app-check-token-flow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Javadoc Changes:--- /Users/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/appcheck/ktx/package-summary.html 2023-03-21 12:57:53.000000000 +0000
+++ /Users/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/appcheck/ktx/package-summary.html 2023-03-21 12:53:18.000000000 +0000
@@ -53,6 +53,13 @@
<p>Returns the <code><a href="/docs/reference/kotlin/com/google/firebase/appcheck/FirebaseAppCheck.html">FirebaseAppCheck</a></code> instance of the default <code><a href="/docs/reference/kotlin/com/google/firebase/FirebaseApp.html">FirebaseApp</a></code>.</p>
</td>
</tr>
+ <tr>
+ <td><code><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a><<a href="/docs/reference/kotlin/com/google/firebase/appcheck/AppCheckToken.html">AppCheckToken</a>></code></td>
+ <td>
+ <div><code><a href="/docs/reference/kotlin/com/google/firebase/appcheck/FirebaseAppCheck.html">FirebaseAppCheck</a>.<a href="/docs/reference/kotlin/com/google/firebase/appcheck/ktx/package-summary.html#(com.google.firebase.appcheck.FirebaseAppCheck).tokenChanges()">tokenChanges</a></code></div>
+ <p>Registers an <code><a href="/docs/reference/kotlin/com/google/firebase/appcheck/FirebaseAppCheck.AppCheckListener.html">AppCheckListener</a></code> to changes in the token state.</p>
+ </td>
+ </tr>
</tbody>
</table>
</div>
@@ -120,6 +127,12 @@
<pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/ktx/Firebase.html">Firebase</a>.<a href="/docs/reference/kotlin/com/google/firebase/appcheck/ktx/package-summary.html#(com.google.firebase.ktx.Firebase).appCheck()">appCheck</a>: <a href="/docs/reference/kotlin/com/google/firebase/appcheck/FirebaseAppCheck.html">FirebaseAppCheck</a></pre>
<p>Returns the <code><a href="/docs/reference/kotlin/com/google/firebase/appcheck/FirebaseAppCheck.html">FirebaseAppCheck</a></code> instance of the default <code><a href="/docs/reference/kotlin/com/google/firebase/FirebaseApp.html">FirebaseApp</a></code>.</p>
</div>
+ <div class="api-item"><a name="(com.google.firebase.appcheck.FirebaseAppCheck).getTokenChanges()"></a><a name="(com.google.firebase.appcheck.FirebaseAppCheck).setTokenChanges()"></a><a name="-com.google.firebase.appcheck.FirebaseAppCheck-.getTokenChanges--"></a><a name="-com.google.firebase.appcheck.FirebaseAppCheck-.setTokenChanges--"></a>
+ <h3 class="api-name" id="(com.google.firebase.appcheck.FirebaseAppCheck).tokenChanges()">tokenChanges</h3>
+ <pre class="api-signature no-pretty-print">val <a href="/docs/reference/kotlin/com/google/firebase/appcheck/FirebaseAppCheck.html">FirebaseAppCheck</a>.<a href="/docs/reference/kotlin/com/google/firebase/appcheck/ktx/package-summary.html#(com.google.firebase.appcheck.FirebaseAppCheck).tokenChanges()">tokenChanges</a>: <a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a><<a href="/docs/reference/kotlin/com/google/firebase/appcheck/AppCheckToken.html">AppCheckToken</a>></pre>
+ <p>Registers an <code><a href="/docs/reference/kotlin/com/google/firebase/appcheck/FirebaseAppCheck.AppCheckListener.html">AppCheckListener</a></code> to changes in the token state. This <code><a href="https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html">Flow</a></code> should be used ONLY if you need to authorize requests to a non-Firebase backend. Requests to Firebase backends are authorized automatically if configured.</p>
+ <p>Back-pressure is handled by dropping the oldest value in the buffer on overflow.</p>
+ </div>
</body>
</html>
|
Coverage Report 1Affected ProductsNo changes between base commit (47e7a88) and merge commit (43f43cc).Test Logs |
Size Report 1Affected Products
Test Logs |
Startup Time Report 1Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS. Notes
Startup Times
|
rlazo
approved these changes
Mar 29, 2023
rlazo
requested changes
Oct 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you plan to merge it now, it has to be done also in non-ktx version of the file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding the Flow approved in go/kotlin-flows-firebase-android-addendum.
Note that I've used
.buffer(capacity = Channel.CONFLATED)
in this one to handle back-pressure. This will drop older values, which I assume are not relevant because developers might only be interested in the newestAppCheckToken
emitted by theFlow
.