Conversation
| } | ||
|
|
||
| api: FeathersApplication<ServiceTypes> | ||
| api: FeathersClient |
There was a problem hiding this comment.
we shouldn't overload this here, since we access it on the backend and it will have different types
There was a problem hiding this comment.
we should be able to declare a type override in client-core that will only be applied in packages that import client-core
There was a problem hiding this comment.
Weird, I made this change because of type errors when I started, but maybe something has changed in dev since then, because now it's not showing any type mismatches when I revert to what it was.
| 'capacitor://' + appConfig.server.clientHost, | ||
| 'ionic://' + appConfig.server.clientHost | ||
| 'ionic://' + appConfig.server.clientHost, | ||
| 'https://cool.pants.com', |
There was a problem hiding this comment.
Left over test domains? We should probably remove capacitor & ionic stuff too
9ddd052 to
6561bc3
Compare
3e4fcf0 to
afbd7af
Compare
For multi-domain setups, having to log in on each different domain is annoying. This saves the user's login information in the 'root' domain of the deployment, and on all domains sources the login credentials from an iframe running in the root domain using postMessage. This only gets skipped if a user has expressly denied cross-domain sharing of their login information, in which case localStorage will be used as the source for login credentials. The iframe loads a new non-vite page in client/public, and does so in the root domain. Some user authorization flow is required on most browsers to enable this, using the requestStorageAccess API. A new backend service, allowed-domains, takes in a domain on a query paramter and returns true if that domain is part of the deployment, and a 204 if not. By default this just returns the root domain, but this is extensible via projects' hooks to add other domains to the allowed list. It can also just be passed a variable isAllowed from a hook if fetching all domains would be cumbersome, and simply querying whether the domain is in a table would be simpler. The accessor iframe uses the response to determine whether to even attempt to access the cookies or prompt the user with requestStorageAccess.
afbd7af to
af080a2
Compare
|
Note to myself, something about the cookie seems to mess up OAuth login on the root domain if it becomes disconnected from a database user. Locally, I'd reinited the database several times while the cookie was still on localhost:3000, and it broke all OAuth providers. The |
Summary
References
closes #insert number here
QA Steps