File tree Expand file tree Collapse file tree
src/cli/operations/identity Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,11 +104,9 @@ export async function createOAuth2Provider(
104104 } catch ( error ) {
105105 const errorName = ( error as { name ?: string } ) . name ;
106106 if ( errorName === 'ConflictException' || errorName === 'ResourceAlreadyExistsException' ) {
107- // Unlike API key providers, OAuth needs the ARN back for deployed-state.json.
108- // This only triggers in a race condition (another process created between exists-check
109- // and create). The caller already routes to update for known-existing providers, so
110- // falling back to GET here is safe — the next deploy will update with fresh credentials.
111- return getOAuth2Provider ( client , params . name ) ;
107+ // Race condition: another process created the provider between our exists-check and
108+ // create call. Fall back to update so the user's credentials are always applied.
109+ return updateOAuth2Provider ( client , params ) ;
112110 }
113111 return {
114112 success : false ,
You can’t perform that action at this time.
0 commit comments