Skip to content

Commit 8bb021d

Browse files
committed
fix: Correct access token extraction regex in API V2 script
- Update regex pattern to handle space after colon in JSON response - Fixes Chrome Web Store deployment failure in CI/CD pipeline
1 parent e40ffef commit 8bb021d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/test-api-v2-two-step.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ACCESS_TOKEN_RESPONSE=$(curl -s -X POST \
5555
-d "refresh_token=$REFRESH_TOKEN" \
5656
-d "grant_type=refresh_token")
5757

58-
ACCESS_TOKEN=$(echo "$ACCESS_TOKEN_RESPONSE" | grep -o '"access_token":"[^"]*' | sed 's/"access_token":"//')
58+
ACCESS_TOKEN=$(echo "$ACCESS_TOKEN_RESPONSE" | grep -o '"access_token": *"[^"]*' | sed 's/"access_token": *"//')
5959

6060
if [[ -z "$ACCESS_TOKEN" ]]; then
6161
echo "❌ Failed to get access token:"

0 commit comments

Comments
 (0)