Skip to content

fix(freemilk): sign in with the app's Google authorization code - #681

Merged
caigee-cmd merged 2 commits into
mainfrom
fix/freemilk-google-login
Dec 6, 2026
Merged

caigee-cmd merged 2 commits into
mainfrom
fix/freemilk-google-login

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Summary

  • Match the FreeMilk app's Google sign-in: authorization code, S256 PKCE, and the redirect URI registered for the app's Google client.
  • Exchange the code at oauth2.googleapis.com/token, then post the identity token and user_info to POST /auth/google.
  • Keep DeviceCheck out of the request. The account API accepts the login without it, and this process cannot mint an Apple device attestation.

The console opens a local forwarder, which redirects the browser to Google. If the custom-scheme redirect does not return to that forwarder, the callback URL can still be pasted.

Test plan

  • go test ./internal/providers/freemilk/
  • Start a FreeMilk login from the console and finish it in the browser

Use the registered custom-scheme redirect and PKCE code exchange instead of
an unregistered loopback id_token redirect. DeviceCheck stays omitted because
the account API accepts the login without it.
The provider only resolves the authorization URL and accepts the code. The
loopback redirect stays in internal/auth, which owns the response writer.
@caigee-cmd
caigee-cmd merged commit 179c91d into main Dec 6, 2026
6 checks passed
@caigee-cmd
caigee-cmd deleted the fix/freemilk-google-login branch December 6, 2026 04:49
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.

1 participant