mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
feat(desktop): sign in with the browser without typing a code (#3286)
This commit is contained in:
1 parent
510cc1b916
commit
c5453f83e8
57 files changed
+7060
-3854
No files matched your search
@@ -8,11 +8,19 @@ export const DESKTOP_HANDOFF_CHANNELS = Object.freeze({
|
||||
export const DesktopHandoffStatus = Object.freeze({
|
||||
PENDING: 'pending',
|
||||
EXPIRED: 'expired',
|
||||
DENIED: 'denied',
|
||||
COMPLETED: 'completed',
|
||||
} as const);
|
||||
|
||||
export type DesktopHandoffStatus = (typeof DesktopHandoffStatus)[keyof typeof DesktopHandoffStatus];
|
||||
|
||||
export const DesktopHandoffReturnMethod = Object.freeze({
|
||||
DEEP_LINK: 'deep_link',
|
||||
CODE: 'code',
|
||||
} as const);
|
||||
|
||||
export type DesktopHandoffReturnMethod = (typeof DesktopHandoffReturnMethod)[keyof typeof DesktopHandoffReturnMethod];
|
||||
|
||||
export interface DesktopHandoffInstance {
|
||||
readonly apiEndpoint: string;
|
||||
readonly apiVersion: number;
|
||||
@@ -23,6 +31,7 @@ export interface DesktopHandoffSession {
|
||||
readonly instance: DesktopHandoffInstance;
|
||||
readonly code: string;
|
||||
readonly expiresAt: string;
|
||||
readonly returnMethod: DesktopHandoffReturnMethod;
|
||||
}
|
||||
|
||||
export interface DesktopHandoffUser {
|
||||
@@ -34,7 +43,10 @@ export interface DesktopHandoffUser {
|
||||
}
|
||||
|
||||
export interface DesktopHandoffIncompleteResult {
|
||||
readonly status: typeof DesktopHandoffStatus.PENDING | typeof DesktopHandoffStatus.EXPIRED;
|
||||
readonly status:
|
||||
| typeof DesktopHandoffStatus.PENDING
|
||||
| typeof DesktopHandoffStatus.EXPIRED
|
||||
| typeof DesktopHandoffStatus.DENIED;
|
||||
}
|
||||
|
||||
export interface DesktopHandoffCompletedResult {
|
||||
|
||||
Reference in new issue
Block a user