mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +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: '' };
|
|
}
|
|
}
|
|
}
|