File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ app.get("/auth/callback", async (c) => {
261261 state,
262262 userName : userData . username ,
263263 isAuthenticated : true ,
264+ isOAuth : true ,
264265 } ,
265266 } ) ;
266267
Original file line number Diff line number Diff line change @@ -385,7 +385,7 @@ For more information, visit: https://www.globalping.io
385385 userData : Record < string , any > ;
386386 } {
387387 const isAuth = this . props ?. isAuthenticated ;
388- const hasAPIToken = this . props ?. accessToken && isValidAPIToken ( this . props . accessToken ) ;
388+ const hasAPIToken = ! this . props ?. isOAuth ;
389389
390390 // Check API token first (most specific) to prevent misclassification
391391 // as OAuth when API token flow sets isAuthenticated and userName
@@ -550,6 +550,7 @@ async function handleAPITokenRequest<
550550 userName : "API Token User" ,
551551 clientId : "" ,
552552 isAuthenticated : true ,
553+ isOAuth : false ,
553554 } satisfies Props ;
554555
555556 if ( pathname === MCP_CONFIG . ROUTES . SSE || pathname === MCP_CONFIG . ROUTES . SSE_MESSAGE ) {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export type Props = {
55 userName : string ;
66 clientId : string ;
77 isAuthenticated : boolean ;
8+ isOAuth : boolean ;
89} ;
910
1011// Define custom state for storing previous measurements
You can’t perform that action at this time.
0 commit comments