Dynamic Api Keys

Offen
#871 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
25/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Veraltet
Bereich
api, frontend

Rechercherichtung

Beginne am Loader-Einstiegspunkt und verfolge den Fehler „Loader must not be called again with different options“, wenn sich apiKey zwischen Domains ändert. Ermittle, ob dynamische oder mehrere apiKeys unterstützt werden, und identifiziere den empfohlenen Ansatz; abgeschlossen ist die Aufgabe, wenn das unterstützte Verhalten oder die Einschränkung klar dokumentiert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

type: question wontfix

Hello,

I'm using an app with multiple domains, and I would like to switch between different apiKeys depending on which domain is being used to access the app. However, once I instantiate the component with a particular apiKey, if I then access the app via another domain, I encounter the following error: "Error: Loader must not be called again with different options."

I've tried instantiating it in different components and even in separate routes within the same application to ensure different Loaders are created, but I still encounter the same error.

My question is: once a Loader is instantiated with an apiKey, is it possible to dynamically change it? Or is there any recommended approach to handle multiple apiKeys?

Thank you in advance for your help!

Vorherrschende Sprache
TypeScript
Sterne
451
Forks
75
Ø Merge
2 Min.
Gemergte PRs (30 T.)
31

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus googlemaps/js-api-loader

Alle Issues in googlemaps/js-api-loader

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.