fix registration on electron

This commit is contained in:
Nicolas Constant 2019-11-30 21:16:25 -05:00
parent df9da325f1
commit 4ef26b2f61
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 5 additions and 1 deletions

View File

@ -101,7 +101,11 @@ export class AddNewAccountComponent implements OnInit {
if (instanceApps.length !== 0) {
return Promise.resolve(instanceApps[0].app);
} else {
const redirect_uri = this.getLocalHostname();
let redirect_uri = this.getLocalHostname();
if (process && process.versions && typeof((<any>process.versions).electron) === 'string') {
redirect_uri += '/register';
}
return this.authService.createNewApplication(instance, 'Sengi', redirect_uri, 'read write follow', 'https://nicolasconstant.github.io/sengi/')
.then((appData: AppData) => {
return this.saveNewApp(instance, appData)