mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +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: '' };
|
|
}
|
|
}
|
|
}
|