Skip to content
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

feat(keyAutoAdd): support key addition for GateHub #774

Merged
merged 7 commits into from
Dec 17, 2024

Conversation

sidvishnoi
Copy link
Member

@sidvishnoi sidvishnoi commented Dec 13, 2024

Context

Closes #618

Changes proposed in this pull request

  • Add GateHub automatic key addition support via their GraphQL API.
    • Create a lightweight graphQl fetch request helper.
    • GateHub login is on a different domain (cross-domain navigations), but our key add process handles that as well 🎉
  • GateHub needs to fix some grant issues for connect to complete. But extension will be ready when they do. Key gets added for sure.
  • For E2E tests, would need a way to setup TOTP 2FA, and bypass security measures such as trusted device, which is not possible at the moment. So, no E2E tests added (as impossible).
    • Keep helpers in helpers/gatehub for reuse in E2E tests in case we can bypass above in future.

@github-actions github-actions bot added area: content Improvements or additions to extension content script area: background Improvements or additions to extension background script labels Dec 13, 2024
Copy link
Contributor

github-actions bot commented Dec 13, 2024

Extension builds preview

Name Link
Latest commit 53c8d86
Latest job logs Run #12372993531
BadgeDownload
BadgeDownload

Comment on lines -65 to +67
width: '22rem',
height: '8rem',
width: '22em',
height: '8em',
fontSize: '16px',
Copy link
Member Author

Choose a reason for hiding this comment

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

GateHub has fontSize: 10px on root, so our notification UI had size reduced. This fixes it.

return json.data as R;
}

export class GraphQlError extends Error {
Copy link
Member Author

Choose a reason for hiding this comment

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

Just for us to distinguish between regular error and gql error and (if needed) get error info.

@sidvishnoi sidvishnoi marked this pull request as ready for review December 16, 2024 11:04
src/content/keyAutoAdd/gatehub.ts Outdated Show resolved Hide resolved
@sidvishnoi sidvishnoi merged commit 56cd827 into main Dec 17, 2024
8 checks passed
@sidvishnoi sidvishnoi deleted the gatehub-key-addition branch December 17, 2024 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: background Improvements or additions to extension background script area: content Improvements or additions to extension content script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Setup]: Automate key addition for GateHub
2 participants