Skip to content

Conversation

@arjansingh
Copy link
Contributor

@arjansingh arjansingh commented Oct 21, 2025

Summary

Changes

  • What:
  • Breaking:
  • Dependencies:

Review Focus

Screenshots (if applicable)

┆Issue is synchronized with this Notion page by Unito

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)
@github-actions
Copy link

github-actions bot commented Oct 21, 2025

🎨 Storybook Build Status

Build failed!

⏰ Completed at: 10/21/2025, 01:48:20 AM UTC

🔗 Links


⚠️ Please check the workflow logs for error details.

@github-actions
Copy link

github-actions bot commented Oct 21, 2025

🎭 Playwright Test Results

🕵🏻 No test results found

⏰ Completed at: 10/21/2025, 01:51:13 AM UTC

📊 Test Reports by Browser

  • chromium: Deployment failed
  • chromium-2x: Deployment failed
  • chromium-0.5x: Deployment failed
  • mobile-chrome: Deployment failed

🎉 Click on the links above to view detailed test results for each browser configuration.

})

// Global authentication guard
router.beforeEach(async (_to, _from, next) => {
Copy link
Contributor Author

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) {
Copy link
Contributor Author

@arjansingh arjansingh Oct 21, 2025

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> {
Copy link
Contributor Author

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) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

await

Copy link
Contributor Author

@arjansingh arjansingh left a 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()
Copy link
Contributor Author

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.

Copy link
Contributor Author

@arjansingh arjansingh left a 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.

Copy link
Contributor Author

@arjansingh arjansingh left a 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.

Comment on lines +40 to +49
=======
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)
Copy link
Contributor Author

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)
Copy link
Contributor Author

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.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

take new

Copy link
Contributor Author

@arjansingh arjansingh left a 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')) {
Copy link
Contributor Author

@arjansingh arjansingh Oct 21, 2025

Choose a reason for hiding this comment

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

short term: if(isCloud)...

Copy link
Contributor Author

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
=======
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Copy link
Contributor Author

@arjansingh arjansingh left a 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.

@arjansingh
Copy link
Contributor Author

see #6195 for actual implementation.

@arjansingh arjansingh closed this Oct 22, 2025
@arjansingh arjansingh deleted the feat/cloud-auth-gates branch October 22, 2025 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants