unified authentication#413
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 457de50f36
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| }); | ||
|
|
||
| // Keep a metadata-only compatibility record for consumers outside this migration. | ||
| write(localStorage, legacyKey, sanitizedRecords); |
There was a problem hiding this comment.
Preserve tokens until all legacy readers are converted
When a user already has a SynBioHub or Flapjack token in legacy localStorage, this migration rewrites SynbioHub/Flapjack without authtoken/refresh even though several workflow components still read credentials only from those legacy keys (for example CollectionWizard.jsx, CreateCollectionModal.jsx, and CredentialCheckModal.jsx). After migration those flows pass an empty/null token to upload, create-collection, and credential-check APIs while the real token is only in sessionStorage, so previously logged-in users are treated as unauthenticated. Please either convert those consumers or keep the legacy token until all readers use the new store.
Useful? React with 👍 / 👎.
|
|
||
| const SBHOnly = ({opened, onClose, goBack}) => { | ||
| const [instanceData, setInstanceData] = useLocalStorage({ key: "SynbioHub", defaultValue: [] }); | ||
| const [instanceData, setInstanceData] = useRepositoryStorage('synbiohub'); |
There was a problem hiding this comment.
Add newly registered repos to the new store before login
When this modal is reached from the unified ADD_SBH_REPO flow, the new repository was just written by addRegistryToStorage('SynbioHub', ...) in unifiedModal.jsx, not into synbiosuite.repositories.v1; because migration is one-shot, useRepositoryStorage('synbiohub') returns no matching instanceData. The login can succeed, but the later instanceData.map(...) has nothing to replace, so setInstanceData([]) never persists the new repository or its token and the subsequent credential check cannot find the login. Please add the selected repo to the new store or convert the add-repository flow before using the new hook here.
Useful? React with 👍 / 👎.
…ons-build-and-deploy-workflow Split PR validation from production deploy for Azure Static Web Apps to avoid staging exhaustion
…ntain permissions' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…lidation Deploy staged previews after validation
Updated pyflapjack dependency to a specific commit and adjusted other dependencies.
…-ci-failure-uo2zxo Fix frontend package install metadata and commit frontend/package-lock.json
| setSelected(updatedInstance.registryURL); | ||
| goBack(false) | ||
| if (onSuccess) onSuccess(updatedInstance); | ||
| else goBack(false) |
| //Does not work as intended | ||
| //Throws CORS error | ||
| const login = async (uri, refresh) => { | ||
| const login = async (uri) => { |
| user_graph, | ||
| ) | ||
| except requests.RequestException as error: | ||
| return jsonify({'error': f'SynBioHub member query failed: {error}'}), 502 |
No description provided.