auto open github login page when signing in (#636)

This commit is contained in:
Gabriel Gordon-Hall
2025-09-05 18:02:02 +01:00
committed by GitHub
parent 08be5c060c
commit abee94189a
2 changed files with 3 additions and 5 deletions

View File

@@ -90,12 +90,13 @@ export function GitHubLoginDialog({
};
}, [polling, deviceState]);
// Automatically copy code to clipboard when deviceState is set
// Automatically copy code to clipboard and open GitHub URL when deviceState is set
useEffect(() => {
if (deviceState?.user_code) {
copyToClipboard(deviceState.user_code);
window.open(deviceState.verification_uri, '_blank');
}
}, [deviceState?.user_code]);
}, [deviceState?.user_code, deviceState?.verification_uri]);
const copyToClipboard = async (text: string) => {
try {

View File

@@ -345,9 +345,6 @@ export function GeneralSettings() {
<Key className="h-5 w-5" />
GitHub Integration
</CardTitle>
<CardDescription>
Connect your GitHub account to enable advanced features.
</CardDescription>
</CardHeader>
<CardContent className="space-y-4">
{isAuthenticated ? (