MCPcopy Create free account
hub / github.com/Waishnav/devspace / getRefreshToken

Method getRefreshToken

src/oauth-store.ts:159–174  ·  view source on GitHub ↗
(tokenHash: string)

Source from the content-addressed store, hash-verified

157 }
158
159 getRefreshToken(tokenHash: string): PersistedRefreshTokenRecord | undefined {
160 const row = this.database.sqlite
161 .prepare(
162 "select client_id, scopes_json, expires_at, resource from oauth_refresh_tokens where token_hash = ?",
163 )
164 .get(tokenHash) as
165 | {
166 client_id: string;
167 scopes_json: string;
168 expires_at: number;
169 resource: string | null;
170 }
171 | undefined;
172
173 return row ? rowToRefreshTokenRecord(row) : undefined;
174 }
175
176 deleteRefreshToken(tokenHash: string): void {
177 this.database.sqlite.prepare("delete from oauth_refresh_tokens where token_hash = ?").run(tokenHash);

Callers 4

testExpiredTokenCleanupFunction · 0.95
exchangeRefreshTokenMethod · 0.80

Calls 1

rowToRefreshTokenRecordFunction · 0.85

Tested by 3

testExpiredTokenCleanupFunction · 0.76