2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 11:29:03 +00:00
books/fyo/demux/auth.ts

19 lines
442 B
TypeScript
Raw Normal View History

import { AuthDemuxBase } from 'utils/auth/types';
import { Creds } from 'utils/types';
export class AuthDemux extends AuthDemuxBase {
#isElectron = false;
constructor(isElectron: boolean) {
super();
this.#isElectron = isElectron;
}
async getCreds(): Promise<Creds> {
if (this.#isElectron) {
2023-07-10 09:12:20 +00:00
return await ipc.getCreds();
} else {
return { errorLogUrl: '', tokenString: '', telemetryUrl: '' };
}
}
}