@@ -13,7 +13,6 @@ const profile: Profile = {
13
13
export class GitHubAuthHandler extends ElectronBasePlugin {
14
14
clients : GitHubAuthHandlerClient [ ] = [ ]
15
15
constructor ( ) {
16
- console . log ( '[GitHubAuthHandler] Initializing' )
17
16
super ( profile , clientProfile , GitHubAuthHandlerClient )
18
17
this . methods = [ ...super . methods , 'getClientId' , 'getAccessToken' ]
19
18
}
@@ -30,8 +29,6 @@ export class GitHubAuthHandler extends ElectronBasePlugin {
30
29
}
31
30
} )
32
31
33
- console . log ( '[GitHubAuthHandler] GitHub response:' , response . data )
34
-
35
32
if ( response . data . access_token ) {
36
33
this . sendAccessToken ( response . data . access_token )
37
34
console . log ( '[GitHubAuthHandler] Access token received:' , response . data . access_token )
@@ -75,7 +72,6 @@ const clientProfile: Profile = {
75
72
}
76
73
class GitHubAuthHandlerClient extends ElectronBasePluginClient {
77
74
constructor ( webContentsId : number , profile : Profile ) {
78
- console . log ( '[GitHubAuthHandlerClient] Initializing with webContentsId:' , webContentsId )
79
75
super ( webContentsId , profile )
80
76
}
81
77
@@ -85,7 +81,6 @@ class GitHubAuthHandlerClient extends ElectronBasePluginClient {
85
81
const redirectUri = `remix://auth/callback`
86
82
const scope = 'repo gist user:email read:user'
87
83
const url = `https://github.com/login/oauth/authorize?client_id=${ clientId } &redirect_uri=${ encodeURIComponent ( redirectUri ) } &scope=${ encodeURIComponent ( scope ) } &response_type=code`
88
- console . log ( '[GitHubAuthHandlerClient] Opening GitHub login URL:' , url )
89
84
shell . openExternal ( url ) ; // open in browser
90
85
} catch ( error ) {
91
86
console . error ( '[GitHubAuthHandlerClient] Error fetching client ID:' , error )
@@ -94,12 +89,11 @@ class GitHubAuthHandlerClient extends ElectronBasePluginClient {
94
89
}
95
90
96
91
async sendAccessToken ( token : string ) : Promise < void > {
97
- console . log ( '[GitHubAuthHandlerClient] Sending access token:' , token )
92
+
98
93
this . emit ( 'onLogin' , { token } )
99
94
}
100
95
101
96
async sendAuthFailure ( error : string ) : Promise < void > {
102
- console . error ( '[GitHubAuthHandlerClient] Sending auth failure:' , error )
103
97
this . emit ( 'onError' , { error } )
104
98
}
105
99
0 commit comments