mirror of
https://github.com/frappe/books.git
synced 2024-12-23 03:19:01 +00:00
19 lines
442 B
TypeScript
19 lines
442 B
TypeScript
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) {
|
|
return await ipc.getCreds();
|
|
} else {
|
|
return { errorLogUrl: '', tokenString: '', telemetryUrl: '' };
|
|
}
|
|
}
|
|
}
|