import type { DelegationChain, DelegationIdentity, ECDSAKeyIdentity } from '@icp-sdk/core/identity'; import type { ConsoleParameters, SatelliteParameters } from '@junobuild/ic-client/actor'; import type { AuthenticationGitHubRedirect } from '../providers/github/types/authenticate'; import type { AuthenticationGoogleCredentials } from '../providers/google/types/authenticate'; import type { AuthenticationData } from './actor'; export type AuthenticationParams = { google: { redirect: null; auth: T; } | { credentials: AuthenticationGoogleCredentials; auth: T; }; } | { github: { redirect: AuthenticationGitHubRedirect | null; auth: T; }; }; export interface AuthenticatedIdentity { identity: DelegationIdentity; delegationChain: DelegationChain; sessionKey: ECDSAKeyIdentity; } /** * Represents initialization parameters for either a Console or Satellite actor. */ export type AuthParameters = { console: Omit & Required>; } | { satellite: Omit & Required>; }; export interface AuthenticatedSession { identity: AuthenticatedIdentity; data: AuthenticationData; }