auto open github login page when signing in (#636)
This commit is contained in:
committed by
GitHub
parent
08be5c060c
commit
abee94189a
@@ -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 {
|
||||
|
||||
@@ -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 ? (
|
||||
|
||||
Reference in New Issue
Block a user