(params?: {
allowRefresh?: boolean
})
| 49 | } |
| 50 | |
| 51 | async 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 | |
| 67 | function hasOauthProfileAccess(session: OAuthClientSession): boolean { |
| 68 | return ( |
no test coverage detected