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鈥檒l 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