-
Notifications
You must be signed in to change notification settings - Fork 406
DO NOT MERGE: Feat/cloud auth gates #6174
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
Conversation
Merge conflicts: - src/scripts/api.ts - Content conflict
Merge conflicts: - src/composables/auth/useCurrentUser.ts - Content conflict - src/types/comfy.ts - Content conflict
Merge conflicts: - src/locales/en/main.json - Content conflict - src/onboardingCloudRoutes.ts - Modify/delete conflict (file deleted in HEAD, modified in commit) - src/platform/onboarding/cloud/UserCheckView.vue - Modify/delete conflict (file deleted in HEAD, modified in commit)
🎨 Storybook Build Status❌ Build failed! ⏰ Completed at: 10/21/2025, 01:48:20 AM UTC 🔗 Links
|
🎭 Playwright Test Results🕵🏻 No test results found ⏰ Completed at: 10/21/2025, 01:51:13 AM UTC 📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
| }) | ||
|
|
||
| // Global authentication guard | ||
| router.beforeEach(async (_to, _from, next) => { |
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.
short term: isCloud
long term: extension for router hooks
| // Check if user is authenticated (Firebase or API key) | ||
| const authHeader = await authStore.getAuthHeader() | ||
|
|
||
| if (!authHeader) { |
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.
if (authHeader) {
next()
return
}| /** | ||
| * Waits for Firebase auth to be initialized before proceeding | ||
| */ | ||
| async #waitForAuthInitialization(): Promise<void> { |
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.
private typescript
| return | ||
| } | ||
|
|
||
| return new Promise<void>((resolve) => { |
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.
await
arjansingh
left a comment
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.
0562d87 - look at moving code either into to @/platform/cloud/auth or alongside firebase stuff.
| if (!authHeader) { | ||
| // User is not authenticated, show sign-in dialog | ||
| const dialogService = useDialogService() | ||
| const loginSuccess = await dialogService.showSignInDialog() |
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.
double check to see if this is part of the app already.
arjansingh
left a comment
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.
249e27a - confirm that this websocket auth token re-init (with firebase) is needed?
if so try to merge without isCloud gate.
arjansingh
left a comment
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.
4abdaa3 - no isCloud needed. this cherry-pick might not even be needed.
| ======= | ||
| const onUserResolved = (callback: (user: AuthUserInfo) => void) => { | ||
| if (resolvedUserInfo.value) { | ||
| callback(resolvedUserInfo.value) | ||
| } | ||
|
|
||
| const stop = whenever(resolvedUserInfo, callback) | ||
| return () => stop() | ||
| } | ||
| >>>>>>> 775c856bf (port user ID expose hook from 6786d8e to cloud) |
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.
do note use this. take HEAD
| <<<<<<< HEAD | ||
| handleDeleteAccount, | ||
| ======= | ||
| >>>>>>> 775c856bf (port user ID expose hook from 6786d8e to cloud) |
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.
Take deletion
| * Extensions can register at any time and will receive the latest value immediately. | ||
| * This is an experimental API and may be changed or removed in the future. | ||
| ======= | ||
| * Fired whenever authentication resolves, providing the user id. |
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.
take new
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.
13b429a - see inline comments
|
|
||
| // Redirect to login page if we're on cloud domain | ||
| const hostname = window.location.hostname | ||
| if (hostname.includes('cloud.comfy.org')) { |
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.
short term: if(isCloud)...
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.
longer term: /logout route that calls firebase and then redirects the users.
| "Close": "Close" | ||
| } | ||
| <<<<<<< HEAD | ||
| ======= |
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.
just resolve this to take the strings
| const authStore = useFirebaseAuthStore() | ||
|
|
||
| // Wait for Firebase auth to initialize | ||
| // Wait for Firebase auth to initialize with timeout |
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.
should be protected by isCloud on line 60
arjansingh
left a comment
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.
82e9a22 - we probably don't need this for auth gating. Merge this commit when we get to the onboarding workflow.
|
see #6195 for actual implementation. |
Summary
Changes
Review Focus
Screenshots (if applicable)
┆Issue is synchronized with this Notion page by Unito