Skip to content

Add fetchAppCheckToken prop to APIProvider#913

Merged
usefulthink merged 8 commits intovisgl:mainfrom
felansu:main
Feb 6, 2026
Merged

Add fetchAppCheckToken prop to APIProvider#913
usefulthink merged 8 commits intovisgl:mainfrom
felansu:main

Conversation

@felansu
Copy link
Contributor

@felansu felansu commented Feb 4, 2026

Summary

  • Add fetchAppCheckToken prop to APIProvider for Firebase App Check integration
  • When provided, sets the token fetcher on google.maps.Settings.getInstance() after the API loads
  • Add type declarations for MapsAppCheckTokenResult and augment Settings interface

Test plan

  • New unit test verifies fetchAppCheckToken is set on google.maps.Settings after API loads
  • All existing tests pass
  • TypeScript compilation passes

Copy link
Collaborator

@usefulthink usefulthink left a comment

Choose a reason for hiding this comment

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

Awesome, thanks a lot for the PR!

Additionally, we need to update the documentation with some information about fetchAppCheckToken, but I can take care of that before merging.

useEffect(() => {
if (status !== APILoadingStatus.LOADED) return;

if (fetchAppCheckToken) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The if here prevents unsetting an existing fetchAppCheckToken setting.

That's likely not a regular occurrence, but always setting the value here shouldn't be an issue.

@usefulthink usefulthink merged commit 992994d into visgl:main Feb 6, 2026
2 checks passed
@usefulthink
Copy link
Collaborator

I just published a new prerelease including this change, stable release of 1.8.0 will probably be in the next week.

npm install @vis.gl/react-google-maps@1.8.0-rc.8

Or use the release-tag:

npm install @vis.gl/react-google-maps@next

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.

2 participants