Skip to content

Create Google authentication module #3451

Closed

Description

@tp

Open points:

  • Consider switching to "internal" token verification like we do in Sign in with Apple, which would allow for testing this offline and with an expired token (mocking the time via clock)
  • Consider simplifying the configuration to not require the whole JSON configu file, but rather just specify the Google "client ID", which is the only field we currently use on that level (to verify that the incoming token was actually meant for our app).
  • Handle configuration all client IDs centrally (see comment). This is a blocker if using multiple platforms (ios and android)
  • Handle refresh tokens, and occasionally background checks (like Apple)
    • Does Google also offer a PUSH web hook for this?
    • Check when the previous flow using authenticationCode (in GoogleEndpoint.authenticateWithServerAuthCode) was used (web & current implementation uses an identity token, but would be great to get them aligned to have 1 codepath and similar functionality)

Activity

  1. self-assigned this
    on Apr 22, 2025
  2. added
    area: authentication
    on Apr 25, 2025
  3. moved this to Later 🥳 in Serverpod Frameworkson Jun 16, 2025
  4. moved this from Later 🥳 to Next 🌟 in Serverpod Frameworkson Jun 23, 2025
  5. moved this from Next Up 🎯 to In Progress 🔥 in Serverpod Frameworkson Jul 10, 2025
  6. tp commented on Jul 25, 2025

    @tp
    ContributorAuthor

    Just ran a local integration test for this:

    Image Image

    It seems like the format of the identify token changed and not the email verification status is given as a String ("true"/"false") under key email_verified. (At least for the one created on web, maybe app tokens differ.) (This matches the spec published at https://accounts.google.com/.well-known/openid-configuration)

    Sadlym I can not commit this test, as it calls to Google's API for reading the token, which will fail as soon as the token is expired (and we should not have external dependencies in the test anyway).

    So maybe a later implementation can fetch the keys from Google and verify the token locally with the keys published at https://www.googleapis.com/oauth2/v3/certs, just like the Apple login works (and is tested).

  7. moved this from In Progress 🔥 to Planned 🔭 in Serverpod Frameworkson Aug 13, 2025
  8. moved this from Planned 🔭 to Next Up 🎯 in Serverpod Frameworkson Oct 10, 2025
  9. moved this from Next Up 🎯 to In Progress 🔥 in Serverpod Frameworkson Oct 13, 2025
  10. self-assigned this
    on Oct 13, 2025
  11. moved this from In Progress 🔥 to Done 🚀 in Serverpod Frameworkson Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: authentication

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions