-
-
Notifications
You must be signed in to change notification settings - Fork 44
feat: add Google One Tap modal #1117
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 adds a Google One Tap modal to the documentation site by integrating a new configuration fetch and rendering mechanism in the Layout wrapper. Key changes include introducing a zod schema for config validation, caching of the fetched configuration, and updating the Docusaurus configuration to include the Google One Tap script and API base URL custom field.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/theme/Layout/index.tsx | Adds LayoutWrapper component for fetching and rendering Google One Tap modal. |
package.json | Adds the "zod" dependency used for runtime config validation. |
docusaurus.config.ts | Injects the Google One Tap client script and adds a custom field for the API base URL. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
src/theme/Layout/index.tsx
Outdated
|
||
setConfig(validatedConfig); | ||
} catch (error) { | ||
console.error('Error fetching or validating Google One Tap config:', error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider implementing a graceful fallback UI or user notification in case the config fetch fails rather than only logging the error.
console.error('Error fetching or validating Google One Tap config:', error); | |
console.error('Error fetching or validating Google One Tap config:', error); | |
setFetchError(true); |
Copilot uses AI. Check for mistakes.
src/theme/Layout/index.tsx
Outdated
id="g_id_onload" | ||
data-client_id={config.clientId} | ||
// TODO: implement handleCredentialResponse page | ||
data-callback="handleCredentialResponse" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding documentation or clarifying the TODO for the 'handleCredentialResponse' callback to guide future implementations.
Copilot uses AI. Check for mistakes.
Deploying logto-docs-tutorials with
|
Latest commit: |
aeacafe
|
Status: | ✅ Deploy successful! |
Preview URL: | https://21f8731a.logto-docs-tutorials.pages.dev |
Branch Preview URL: | https://yemq-add-local-google-one-ta.logto-docs-tutorials.pages.dev |
Deploying logto-docs with
|
Latest commit: |
aeacafe
|
Status: | ✅ Deploy successful! |
Preview URL: | https://c2e354ab.logto-docs.pages.dev |
Branch Preview URL: | https://yemq-add-local-google-one-ta.logto-docs.pages.dev |
2b9f070
to
1d52165
Compare
cea2bd3
to
2f1ff0e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs more review
* feat: check auth status on cloud console * refactor: refactor code * fix: fix page * chore: fix content not render bug * chore: resume least changes * refactor: apply try-retry instead of polling * refactor: use google API instead of HTML component * revert: restore pnpm-lock.yaml to base branch version * refactor: apply browser only to GOT and add referrer policy header * refactor: apply thorough CSP * feat: add GOT callback handler (#1166) * feat: add GOT callback handler * fix: fix CSP, refactor GOT credential verifier * chore: test GET verify API * chore: use otp landing page * chore: add frame-ancestor config * chore: pop up fallback mechanism * chore: redirect in-place and try POST * chore: test without CSP headers for CF * chore: test experience google credential * chore: add debug log and check/grant storage access * chore: update console landing page * refactor: remove unnecessary code * feat: only trigger GOT once * chore: remove unused code * refactor: refactor code
f22a447
to
3ea4b73
Compare
3ea4b73
to
492e8dc
Compare
c31a207
to
5d674d9
Compare
5d674d9
to
8102b7d
Compare
8102b7d
to
aeacafe
Compare
Summary
add Google One Tap modal, resolves LOG-11503