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

Change appcheck activate() to use provider pattern #4902

Merged
merged 11 commits into from
Jul 30, 2021

Conversation

hsubox76
Copy link
Contributor

@hsubox76 hsubox76 commented May 13, 2021

Create provider classes that users can use in activate(). To avoid breaking changes, activate still takes a string site key or our previous custom provider pattern, which is any object with a getToken property.

I also changed addTokenListener to check for existing tokens in both memory and storage because otherwise it will only check storage if getToken() is called, which only happens if the refresher starts, which only happens if automatic token refresh is enabled. I don't think fetching a token from local storage should be gated on that.

Note: API changes should also be propagated to v9 compat after this.

Edit: For docs review - only need to review packages/firebase/index.d.ts

@changeset-bot
Copy link

changeset-bot bot commented May 13, 2021

🦋 Changeset detected

Latest commit: c9c364d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@firebase/app-check Minor
@firebase/app-check-types Minor
firebase Minor
@firebase/rules-unit-testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2021

Changeset File Check ✅

  • No modified packages are missing from the changeset file.
  • No changeset formatting errors detected.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 8, 2021

Size Analysis Report

Affected Products

Diffs between base commit (c8ac613) and head commit (f199147) are too large (84,664 characters) to display.

Please check below links to see details from the original test log.

packages/app-check-types/index.d.ts Outdated Show resolved Hide resolved
packages/app-check/src/api.ts Outdated Show resolved Hide resolved
packages/app-check/src/internal-api.ts Outdated Show resolved Hide resolved
packages/app-check/src/providers.ts Outdated Show resolved Hide resolved
packages/app-check/src/providers.ts Outdated Show resolved Hide resolved
packages/app-check/src/index.ts Show resolved Hide resolved
@Feiyang1 Feiyang1 assigned hsubox76 and unassigned Feiyang1 Jul 13, 2021
@hsubox76 hsubox76 assigned Feiyang1 and unassigned hsubox76 Jul 14, 2021
@Feiyang1 Feiyang1 assigned hsubox76 and unassigned Feiyang1 Jul 26, 2021
@hsubox76 hsubox76 assigned Feiyang1 and unassigned hsubox76 Jul 27, 2021
@Feiyang1 Feiyang1 assigned hsubox76 and unassigned Feiyang1 Jul 28, 2021
@hsubox76 hsubox76 assigned Feiyang1 and kevinthecheung and unassigned hsubox76 Jul 28, 2021
packages/app-check/src/api.ts Outdated Show resolved Hide resolved
packages/app-check/src/index.ts Show resolved Hide resolved
packages/app-check/src/internal-api.ts Outdated Show resolved Hide resolved
@hsubox76 hsubox76 merged commit 8599d91 into master Jul 30, 2021
@hsubox76 hsubox76 deleted the ch-appcheck-provider branch July 30, 2021 22:18
@google-oss-bot google-oss-bot mentioned this pull request Aug 3, 2021
@firebase firebase locked and limited conversation to collaborators Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants