Skip to content

chore: update readme to mention sha-1 header format - #66

Closed
Elbarae1921 wants to merge 1 commit into
itsarvinddev:masterfrom
Elbarae1921:master
Closed

Elbarae1921 wants to merge 1 commit into
itsarvinddev:masterfrom
Elbarae1921:master

Conversation

@Elbarae1921

Copy link
Copy Markdown

Hello, thanks for this great package.

I've spent several hours trying to figure out why my (restricted) API key wasn't working, turns out it was the certificate header format.
I think it would be useful to mention this in the documentation.

Thanks to @dend456's comment.

@itsarvinddev

Copy link
Copy Markdown
Owner

Thank you, @Elbarae1921 — and thanks to @dend456, whose comment on #60 you cited.

You were right that this is a real trap: keytool prints the SHA-1 as AA:BB:CC:..., people paste it verbatim, and the API key rejects it with nothing useful in the error. Hours lost to a formatting detail nobody documents.

One refinement in #73: Google documents the value as Base16 (hex), and case is not significant — only the colons have to go. So rather than "lowercase with colons removed", the README now reads:

// Base16 (hex) SHA-1 of the signing certificate, colons stripped.
// keytool prints AA:BB:CC:... — remove the colons. Case does not matter.
'X-Android-Cert': '00112233445566778899AABBCCDDEEFF00112233',

Your PR also led me to a worse problem in the same block, which I would not have looked at otherwise: the surrounding snippet passed geoCodingApiHeaders to MapLocationPicker — a parameter that has never existed, misspelled and at the wrong nesting level. So anyone following that section could not have got it to compile, headers or no headers. It now shows the real geocodingApiHeaders on the config, and notes that those headers only reach the Geocoding client — the Places calls need the same headers passed via PlacesAPINew(headers: ...), which the docs never mentioned.

Every code block in the README is now compiled in CI (example/lib/readme_samples.dart), so this class of drift fails the build instead of reaching you.

Closing as superseded by #73, with the credit yours. Thanks for taking the time to document something that had already cost you the afternoon.

itsarvinddev added a commit that referenced this pull request Sep 12, 2026
Closes #70, #68, #65, #14. Supersedes #72, #71, #67, #66.

pub.dev score 120/160 -> 160/160. Tests 0 -> 83, green on Flutter 3.38.1 (the declared floor) and 3.47.2.
@itsarvinddev

Copy link
Copy Markdown
Owner

#73 is merged and released as 4.0.0, carrying your change with credit — see the detailed comment above. Closing as superseded, not rejected. Thanks again.

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