Skip to content

feat(core): add anonymous Google One Tap config API #7401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

darcyYe
Copy link
Contributor

@darcyYe darcyYe commented May 20, 2025

Summary

add anonymous Google One Tap config API (resolves LOG-11506)
With this API, all Logto website (including official website, docs, blog and so on) can direct read Google One Tap (GOT) config from this API and no need to set GOT config to env variables for each website.

Testing

Add integration tests.

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@github-actions github-actions bot added the feature Cool stuff label May 20, 2025
Copy link

github-actions bot commented May 20, 2025

COMPARE TO master

Total Size Diff 📈 +9.24 KB

Diff by File
Name Diff
packages/core/src/routes/google-one-tap/index.openapi.json 📈 +1.52 KB
packages/core/src/routes/google-one-tap/index.ts 📈 +3.52 KB
packages/core/src/routes/init.ts 📈 +107 Bytes
packages/core/src/routes/swagger/utils/documents.ts 📈 +140 Bytes
packages/core/src/routes/swagger/utils/general.ts 📈 +100 Bytes
packages/core/src/routes/swagger/utils/operation-id.ts 📈 +58 Bytes
packages/integration-tests/src/tests/api/google-one-tap.test.ts 📈 +3.8 KB

@darcyYe darcyYe force-pushed the yemq-anonymous-google-one-tap-config branch from 1354f49 to 46acf09 Compare May 20, 2025 08:58
@darcyYe darcyYe force-pushed the yemq-anonymous-google-one-tap-config branch from 46acf09 to 2028ed6 Compare May 20, 2025 09:28
@github-actions github-actions bot added size/l and removed size/m labels May 20, 2025
@darcyYe darcyYe force-pushed the yemq-anonymous-google-one-tap-config branch 5 times, most recently from 4ec6e50 to 489e697 Compare May 21, 2025 02:10
@darcyYe darcyYe marked this pull request as ready for review May 21, 2025 02:13
@darcyYe darcyYe force-pushed the yemq-anonymous-google-one-tap-config branch from 489e697 to e688bbc Compare May 21, 2025 02:33
@simeng-li simeng-li requested a review from Copilot May 26, 2025 02:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces an anonymous Google One Tap config API to allow various Logto websites to directly retrieve the Google One Tap configuration without setting environment variables for each site.

  • Added integration tests for the new API endpoint.
  • Updated Swagger documentation and operation IDs for the new route.
  • Integrated the new route into the core routing setup.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/integration-tests/src/tests/api/google-one-tap.test.ts Added tests for various API responses and CORS handling.
packages/core/src/routes/swagger/utils/operation-id.ts Updated route-to-operation mapping with the new Google One Tap API.
packages/core/src/routes/swagger/utils/general.ts Extended tagMap to include Google One Tap when dev features are enabled.
packages/core/src/routes/swagger/utils/documents.ts Included Google One Tap in management API entities and additional tags.
packages/core/src/routes/init.ts Imported and registered the new Google One Tap routes.
packages/core/src/routes/google-one-tap/index.ts Implemented the new API endpoint with CORS validation and config parsing.
packages/core/src/routes/google-one-tap/index.openapi.json Documented the new endpoint in the OpenAPI schema.

@darcyYe darcyYe force-pushed the yemq-anonymous-google-one-tap-config branch from 396874e to 10bef09 Compare June 16, 2025 03:26
@darcyYe darcyYe force-pushed the yemq-anonymous-google-one-tap-config branch from 10bef09 to 2bc5653 Compare June 16, 2025 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants