-
-
Notifications
You must be signed in to change notification settings - Fork 43
feat: check auth status on cloud console #1126
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: yemq-add-local-google-one-tap
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 introduces a cross-domain authentication status check that verifies admin token validity using an iframe-based approach and integrates it into the Docusaurus layout. Key changes include:
- Adding new types and enum definitions for auth status checking in src/theme/Layout/types.ts.
- Implementing the auth status check mechanism, including debug logging, polling, and global exposure of auth state in src/theme/Layout/index.tsx.
- Updating the Docusaurus configuration to support the new auth status check feature via new customFields.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/theme/Layout/types.ts | Added types and enums to define the cross-domain auth status check functionality. |
src/theme/Layout/index.tsx | Integrated auth status checking into the layout with appropriate debug logging and polling. |
docusaurus.config.ts | Updated customFields to include new environment variables for the auth status check feature. |
src/theme/Layout/index.tsx
Outdated
if (isIframeVisible) { | ||
// In debug mode, delay removal to allow inspection | ||
iframe.style.border = '2px solid green'; // Change border color to indicate success | ||
setTimeout(() => { |
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 extracting the various timeout durations (e.g., 5000ms and 10000ms) into named constants for better maintainability and consistency across the auth status check implementation.
Copilot uses AI. Check for mistakes.
aa6815f
to
8087b48
Compare
Deploying logto-docs-tutorials with
|
Latest commit: |
e0d2a7c
|
Status: | ✅ Deploy successful! |
Preview URL: | https://657246d3.logto-docs-tutorials.pages.dev |
Branch Preview URL: | https://yemq-add-auth-status-check.logto-docs-tutorials.pages.dev |
Deploying logto-docs with
|
Latest commit: |
e0d2a7c
|
Status: | ✅ Deploy successful! |
Preview URL: | https://a8b2056f.logto-docs.pages.dev |
Branch Preview URL: | https://yemq-add-auth-status-check.logto-docs.pages.dev |
2b9f070
to
1d52165
Compare
20cb0b9
to
bb57081
Compare
bb57081
to
5622a5c
Compare
Summary
Add auth status check, resolves LOG-11509