MCPcopy Create free account
hub / github.com/Noumena-Network/code / resolveOAuthClientSession

Function resolveOAuthClientSession

src/services/oauth/client.ts:51–65  ·  view source on GitHub ↗
(params?: {
  allowRefresh?: boolean
})

Source from the content-addressed store, hash-verified

49}
50
51async function resolveOAuthClientSession(params?: {
52 allowRefresh?: boolean
53}): Promise<OAuthClientSession> {
54 try {
55 /* eslint-disable @typescript-eslint/no-require-imports */
56 const { getAuthRuntime } =
57 require('../../auth/runtime/AuthRuntime.js') as typeof import('../../auth/runtime/AuthRuntime.js')
58 /* eslint-enable @typescript-eslint/no-require-imports */
59 return await getAuthRuntime().resolveSession({
60 allowRefresh: params?.allowRefresh ?? false,
61 })
62 } catch {
63 return getCurrentOAuthClientSession()
64 }
65}
66
67function hasOauthProfileAccess(session: OAuthClientSession): boolean {
68 return (

Callers 1

Calls 3

getAuthRuntimeFunction · 0.85
resolveSessionMethod · 0.65

Tested by

no test coverage detected