The docs sadly only state that a “Google Maps API key” is required. Yet the docs lack any possible limitation scopes and does not state the actual required APIs.
Can anyone from Auth0 please clarify:
Which Google APIs are required to make the widget word?
What kind of IP OR Websites limitations can be set to limit the Keys usage?
We added several APIs to the Key and added the Auth0 Forms Domain to the whitelist. Still we failed to get the feature running at some point.
Allowing all APIs made it working until the last step of the flow. Then it seems that there is a Server Side call done by Auth0 Servers using the same API key which would then fail due to domain limitations we set. Above the submit button an error message appears “GmapsAddress: invalid API key”. All issues before are only logged by the Google Maps JS SDK.
Is there any recommended safe and sane Google API key config for this feature? Simply allowing all APIs from all sources feels … crazy and wrong … to me. Especially as the key is publicly used within the JS widget.
For reference: APIs we added to the key - without success:
When creating the public API key, you can define website restrictions depending if you’re using an Auth0 domain (eg. {{tenant}}.{{locality}}.auth0.com) or your own custom domain (eg. example.com).
If you have any questions or you still have errors, please provide screenshots of your browser Network tab so we can investigate it.
ok, I believe the API selection was a timing issue. I did not trust the “it might take 5 minutes” note from Google.
In any way the server side vs client side issue remains.
We have the following Websites set:
{{tenant}}.eu.auth0.com/*
{{tenant}}.eu.auth0.com
After submitting the last step this is the following error. As the error is server side we assumed that there is a server side call to the Google API which will fail du to the “websites” restrictions:
That’s the point. You can use one Google API key either with Browser Restrictions OR Server Restrictions. So either domains OR IPs.
You cannot use one restricted key for both worlds. And the widget seem to use the key for both which only works with unrestricted keys. And that’s obvious totally insecure