We are working on two EFB apps for 2024. In each application, we require users to authenticate if not logged in. Both apps share the same DataStore keys, so if a user logs into one, they log into the other. It would be nice to reduce the duplicate auth code in both of our apps, and have them in a central place. In our case, this would also be useful for developers that use our APIs to not have to implement auth logic themselves and instead just rely on the user to log into the EFB.
Would it be possible to implement an API to add additional entries into the settings app?
e.g. in a settings extension
class FooSettingsExtension extends SettingsExtension {
// This will be what is displayed in the header for the section in settings
public get name(): string {
return "Foo Options";
}
// The point of this function is to be able to refer to the settings app dependency from actual EFB app declarations
public get internalID(): string {
return "FOO_SETTINGS_EXTENSION";
}
public render(): TVNode<...>
...
}
Efb.useSettingsExtension(FooSettingsExtension)
then in a regular EFB app
class BarApp extends App {
public getSettingsDependencies(): string[] {
return ["FOO_SETTINGS_EXTENSION"];
}
...
}
// Ideally when the sim would try to load this app and the dependency can't be found, a friendly warning notification would appear in the EFB instead of just going to the console
Efb.use(BarApp);
Thanks,
Jack
Navigraph