From 73c591d082831b44ddd29554e93eb00c084a1e5d Mon Sep 17 00:00:00 2001 From: Proman4713 <85965528+Proman4713@users.noreply.github.com> Date: Sun, 30 Aug 2026 17:44:14 +0300 Subject: [PATCH] Update authenticating-to-the-rest-api-with-an-oauth-app.md The primary check should be for refresh_token, not access_token, since that more closely resembles production environments were the user's access token will expire first. The rest of the code should play out the same, with the subsequent requests failing if the access token is absent or invalid --- .../authenticating-to-the-rest-api-with-an-oauth-app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app.md b/content/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app.md index 13cd3f80f4dd..3a2290d4d5f8 100644 --- a/content/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app.md +++ b/content/apps/oauth-apps/building-oauth-apps/authenticating-to-the-rest-api-with-an-oauth-app.md @@ -261,7 +261,7 @@ CLIENT_SECRET = ENV['GH_BASIC_SECRET_ID'] use Rack::Session::Pool, :cookie_only => false def authenticated? - session[:access_token] + session[:refresh_token] end def authenticate!