-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
|
||
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.
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: |
2b9f070
|
Status: | ✅ Deploy successful! |
Preview URL: | https://5dd7f505.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: |
2b9f070
|
Status: | ✅ Deploy successful! |
Preview URL: | https://fc4cc63e.logto-docs.pages.dev |
Branch Preview URL: | https://yemq-add-local-google-one-ta.logto-docs.pages.dev |
Summary
add Google One Tap modal, resolves LOG-11503