I noticed, that everytime I authenticate my app two modification operations occure. I experimented a little bit with the auth methods of the web API and found out that this only happens if I authenticate an app with own_container: true.
Btw.: I don’t mean the first time I authenticate (there it’s clear that many modification operations have to take place) but successive authentications after the first one. Each auth call costs 2 modify operations where I can’t see why this should be necessary. Could this be a bug?
Reproduceable with this test app: safe://lol/test.html
Here is my auth code:
async function auth() {
let appHandle = await window.safeApp.initialise({
name: 'TestApp2',
id: 'mindphreaker.testapp2',
version: '0.1.2',
vendor: 'Company XY',
});
let authURI = await window.safeApp.authorise(appHandle, {
_public: ['Read', 'Insert', 'Delete', 'ManagePermissions'],
_publicNames: ['Read', 'Insert', 'Delete', 'ManagePermissions']
}, {own_container: true});
await window.safeApp.connectAuthorised(appHandle, authURI);
console.log('handle: ' + appHandle);
}