feat(auth): add connectors v3 as an app (#5751)

This commit is contained in:
Jedd Morgan
2026-03-18 17:43:33 +00:00
committed by GitHub
parent ba6dda6e52
commit 71c3f3b584
3 changed files with 25 additions and 4 deletions
+23 -2
View File
@@ -21,7 +21,8 @@ export enum DefaultAppIds {
SpeckleConnectorsDUI = 'sdui',
Excel = 'spklexcel',
PowerBI = 'spklpwerbi',
Automate = 'spklautoma'
Automate = 'spklautoma',
ConnectorsV3 = 'connectrV3'
}
const SpeckleWebApp = {
@@ -86,6 +87,25 @@ const SpeckleConnectorsDUI = {
]
}
const SpeckleConnectorsV3 = {
id: DefaultAppIds.ConnectorsV3,
secret: DefaultAppIds.ConnectorsV3,
name: 'Desktop Connectors',
description: 'Speckle V3 connectors..',
trustByDefault: false, // NOTE: we do not wanna automatically authenticate in DUI because it uses cached account before which we wanna switch account. trustByDefault: true skips this step
public: true,
redirectUrl: 'http://localhost:29355',
scopes: [
Scopes.Streams.Read,
Scopes.Streams.Write,
Scopes.Profile.Read,
Scopes.Profile.Email,
Scopes.Users.Read,
Scopes.Users.Invite,
...workspaceScopes
]
}
const SpeckleConnectorApp = {
id: DefaultAppIds.Connector,
secret: DefaultAppIds.Connector,
@@ -193,7 +213,8 @@ const defaultApps = [
SpeckleDesktopAuthService,
SpeckleExcel,
SpecklePowerBi,
SpeckleAutomate
SpeckleAutomate,
SpeckleConnectorsV3
]
export function getDefaultApps() {
@@ -170,7 +170,7 @@ describe('GraphQL @apps-api', () => {
expect(res).to.be.json
expect(res.body.errors).to.not.exist
expect(res.body.data.apps).to.be.an('array')
expect(res.body.data.apps.length).to.equal(10)
expect(res.body.data.apps.length).to.equal(11)
})
it('Should get app info without secret if not authenticated and owner', async () => {
@@ -139,7 +139,7 @@ describe('Services @apps-services', () => {
it('Should get all the public apps on this server', async () => {
const apps = await getAllPublicApps()
expect(apps).to.be.an('array')
expect(apps.length).to.equal(10)
expect(apps.length).to.equal(11)
})
it('Should fail to register an app with no scopes', async () => {