Skip to content

Commit cb260eb

Browse files
refactor(posts): add "How to generate Google Cloud identity token"
Post: 2026-02-24-how-to-generate-google-cloud-identity-token.md
1 parent 537610a commit cb260eb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

_posts/2026/2026-02-24-how-to-generate-google-cloud-identity-token.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,15 @@ The output should look like:
6565
}
6666
```
6767

68-
To get just the ID token:
68+
To get just ID token from the headers:
6969

7070
```js
7171
console.log(headers.Authorization.split(' ')[1]);
7272
```
73+
74+
Or simply fetch the token:
75+
76+
```js
77+
const token = await client.idTokenProvider.fetchIdToken(targetAudience);
78+
console.log(token);
79+
```

0 commit comments

Comments
 (0)