File tree Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,13 @@ Invalid request method: %s
2424
2525Invalid request uri: %s
2626
27- # invalidClientId
27+ # warn. invalidClientId
2828
29- Ignoring client ID: %s for Code Builder authentication when CODE_BUILDER=true env var is set.
29+ Code Builder web authentication is only supported with the Code Builder connected app. Ignoring client ID: %s
3030
31- # error.missingCodeBuilderUri
31+ # error.invalidCodeBuilderState
3232
33- Missing Code Builder URI in environment.
34-
35- # error.missingCodeBuilderStateSha
36-
37- Missing Code builder SHA in environment.
33+ Invalid authentication state.
3834
3935# error.HttpApi
4036
Original file line number Diff line number Diff line change @@ -202,21 +202,16 @@ export class WebOAuthServer extends AsyncCreatable<WebOAuthServer.Options> {
202202
203203 if ( env . getBoolean ( 'CODE_BUILDER' ) ) {
204204 if ( this . oauthConfig . clientId && this . oauthConfig . clientId !== CODE_BUILDER_CONNECTED_APP_INFO . clientId ) {
205- this . logger . warn ( messages . getMessage ( 'invalidClientId' , [ this . oauthConfig . clientId ] ) ) ;
205+ this . logger . warn ( messages . getMessage ( 'warn. invalidClientId' , [ this . oauthConfig . clientId ] ) ) ;
206206 }
207207 this . oauthConfig . clientId = CODE_BUILDER_CONNECTED_APP_INFO . clientId ;
208- const cbUri = env . getString ( 'CODE_BUILDER_URI' ) ;
209- if ( ! cbUri ) {
210- throw messages . createError ( 'error.missingCodeBuilderUri' ) ;
211- }
212- const cbStateSha = env . getString ( 'CODE_BUILDER_STATE_SHA' ) ;
208+ const cbStateSha = env . getString ( 'CODE_BUILDER_STATE' ) ;
213209 if ( ! cbStateSha ) {
214- throw messages . createError ( 'error.missingCodeBuilderStateSha ' ) ;
210+ throw messages . createError ( 'error.invalidCodeBuilderState ' ) ;
215211 }
216212 this . oauthConfig . state = JSON . stringify ( {
217213 PORT : port ,
218- CODE_BUILDER_URI : cbUri ,
219- CODE_BUILDER_STATE_SHA : cbStateSha ,
214+ CODE_BUILDER_STATE : cbStateSha ,
220215 } ) ;
221216 const cbProd = env . getBoolean ( 'CODE_BUILDER_PROD' ) ;
222217 this . oauthConfig . redirectUri = cbProd ? CODE_BUILDER_REDIRECT_URI_PROD : CODE_BUILDER_REDIRECT_URI_STAGE ;
You can’t perform that action at this time.
0 commit comments