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

Fix authentication configuration on jbrowse-desktop #3204

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions products/jbrowse-desktop/src/rootModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,21 @@ export default function rootModelFactory(pluginManager: PluginManager) {
const schema = pluginManager.pluggableConfigSchemaType(
'internet account',
) as IAnyModelType
const config = resolveIdentifier(schema, self, id)
const configuration = resolveIdentifier(schema, self, id)

const accountType = pluginManager.getInternetAccountType(config.type)
const accountType = pluginManager.getInternetAccountType(
configuration.type,
)
if (!accountType) {
throw new Error(`unknown internet account type ${config.type}`)
throw new Error(`unknown internet account type ${configuration.type}`)
}

const internetAccount = accountType.stateModel.create({
...initialSnapshot,
type: config.type,
config,
type: configuration.type,
configuration,
})

self.internetAccounts.push(internetAccount)
return internetAccount
},
Expand Down