Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Clarify intended procedure for detecting when a new access token has been generated and how/whether to store it

オープン
#3,568 コメント 1 件 リアクション 4 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
node.js, typescript

調査の方向性

リンクされている認証ガイドと、リポジトリのトラブルシューティング、FAQ、ライブラリの HOW-TO ガイドから始めます。更新された OAuth2 アクセストークンがどのように公開されるか、保存すべきかどうか、利用可能なイベントがあるかどうかを確認します。ドキュメントに、想定される更新、検出、保存の手順が明確に記載されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

size: m type: docs
Please make sure you have searched for information in the following guides.
Documentation Request

When an access token is expired, performing an API request will automatically use the refresh token to fetch a new access token. However, this does not trigger the on('tokens) event; this only fires on the first authentication.

What is not explained clearly in the docs then, is how the new access token is meant to be detected so that it can be stored and reused for its validity period. Otherwise the new access token may be lost and users hit 401 Invalid Credentials errors in subsequent requests.

Is the intent that after each API call, we manually check the oAuth2Client for a new access token via oAuth2Client.credentials.access_token? I.e., add manual token checking logic after each API call? If this is the case, can explicit instructions be added that something like this is the intended approach?

Or is there some other event similar to tokens we can listen for on the oAuth2Client that will automatically trigger upon receiving an updated access token? (If not, can that feature be added?)

Perhaps the access token is not meant to be stored at all? Discarded after each request? But then we are fetching new access tokens for every request after the first hour.

主要言語
TypeScript
スター
12.3k
フォーク
2k
平均マージ
1日 19時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleapis/google-api-nodejs-client のほかの issue

googleapis/google-api-nodejs-client の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。