File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
apps/event-system/services/users Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -333,9 +333,7 @@ module.exports = {
333333 'Accept-Encoding' : 'UTF-8' ,
334334 } ,
335335 params : {
336- client_id : ctx . meta . isAdmin
337- ? process . env . ADMIN_GITHUB_OAUTH_CLIENT_ID
338- : process . env . GITHUB_OAUTH_CLIENT_ID ,
336+ client_id : this . getClientId ( isTerminal , ctx . meta . isAdmin ) ,
339337 client_secret : this . getClientSecret (
340338 isTerminal ,
341339 ctx . meta . isAdmin
@@ -922,6 +920,11 @@ module.exports = {
922920 if ( isAdmin ) return process . env . ADMIN_GITHUB_OAUTH_CLIENT_SECRET ;
923921 return process . env . GITHUB_OAUTH_CLIENT_SECRET ;
924922 } ,
923+ getClientId ( isTerminal : boolean , isAdmin : boolean ) {
924+ if ( isTerminal ) return process . env . GITHUB_OAUTH_CLIENT_CLI_ID ;
925+ if ( isAdmin ) return process . env . ADMIN_GITHUB_OAUTH_CLIENT_ID ;
926+ return process . env . GITHUB_OAUTH_CLIENT_ID ;
927+ } ,
925928 async createOrUpdateUser ( {
926929 ctx,
927930 provider,
You can’t perform that action at this time.
0 commit comments