Import apps/android/src/services/login/index.ts

This commit is contained in:
QQ 2026-11-14 14:17:58 +08:00
parent ffc5f49f9a
commit 5829bc1d08
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
export { loginFlow, LoginFlow } from './login-flow'
export { githubOAuthLoginChannel, googleOAuthLoginChannel, oauthLoginChannel } from './oauth-channel'
export { passwordLoginChannel, type PasswordLoginInput } from './password-channel'
export type {
ImmediateLoginChannel,
LoginChannelContext,
LoginOutcome,
RedirectLoginChannel,
} from './types'
import type { RedirectLoginMethod } from '../../types'
import { githubOAuthLoginChannel, googleOAuthLoginChannel, oauthLoginChannel } from './oauth-channel'
import type { RedirectLoginChannel } from './types'
export const redirectLoginChannels: Record<RedirectLoginMethod, RedirectLoginChannel> = {
oauth: oauthLoginChannel,
'github-oauth': githubOAuthLoginChannel,
'google-oauth': googleOAuthLoginChannel,
}
export function redirectLoginChannelFor(method: RedirectLoginMethod | undefined): RedirectLoginChannel {
return redirectLoginChannels[method ?? 'oauth']
}