Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadInstanceOptionsFromStack is not iso with loadInstanceOptionsFromDOM #1381

Open
zatteo opened this issue Aug 31, 2023 · 0 comments
Open

Comments

@zatteo
Copy link
Contributor

zatteo commented Aug 31, 2023

loadInstanceOptionsFromStack is used as an Oauth equivalent of loadInstanceOptionsFromDOM. But it is not equivalent.

@Ldoppea did a review of what is inside the result of loadInstanceOptionsFromDOM.

Legend :
🟡 manifest
🔴 settings
🟣 config
🟢 instance

{
    "app": {
        "editor": 🟡 WebappManifest.Editor,
        "icon": 🟡 WebappManifest.Icon,
        "name": 🟡 WebappManifest.Name,
        "prefix": 🟡 WebappManifest.NamePrefix,
        "slug": 🟡 WebappManifest.Slug
    },
    "capabilities": { // already good
        "file_versioning": true,
        "flat_subdomains": true,
        "can_auth_with_password": true,
        "can_auth_with_magic_links": false,
        "can_auth_with_oidc": false
    },
    "domain": 🟢 instance.ContextualDomain,
    "flags": {},
    "locale": 🔴settings.locale,
    "subdomain": 🟣config.GetConfig().Subdomains === config.FlatSubdomains ? "flat" : "nested",
    "token": "xxx", // we shouldn't need it here because the method is used by oauth clients that already have a token in their internal structure
    "tracking": 🔴settings.tracking,
    "cozyToken": "xxx", // we shouldn't need it here because the method is used by oauth clients that already have a token in their internal structure
    "cozyDomain": 🟢 instance.ContextualDomain,
    "cozyLocale": 🔴settings.locale,
    "cozyAppEditor": 🟡 WebappManifest.Editor,
    "cozyAppName": 🟡 WebappManifest.Name
    "cozyAppNamePrefix": 🟡 WebappManifest.NamePrefix,
    "cozyAppSlug": 🟡 WebappManifest.Slug,
    "cozyTracking": 🔴settings.tracking,
    "cozyIconPath": 🟡 WebappManifest.Icon,
    "cozySubdomainType": 🟣config.GetConfig().Subdomains === config.FlatSubdomains ? "flat" : "nested",
    "cozyDefaultWallpaper": "//claude.mycozy.cloud/assets/images/default-wallpaper.2302a3c8ec.jpg", // not useful
    "cozyFlags": "" // ??
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant