Skip to content

feat: add GitHub OAuth for admin#1929

Draft
spaenleh wants to merge 13 commits intomainfrom
1907-github-oauth-admin
Draft

feat: add GitHub OAuth for admin#1929
spaenleh wants to merge 13 commits intomainfrom
1907-github-oauth-admin

Conversation

@spaenleh
Copy link
Member

@spaenleh spaenleh commented Jun 30, 2025

fix #1907

TODO: add tests

@spaenleh spaenleh marked this pull request as draft June 30, 2025 12:33
@spaenleh spaenleh requested a review from pyphilia June 30, 2025 12:33
@spaenleh spaenleh self-assigned this Jun 30, 2025
@spaenleh spaenleh added the feature New feature or request label Jun 30, 2025
Copy link
Contributor

@pyphilia pyphilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR, let me know if we need to discuss on some points!

Is it necessary to setup the github credentials locally? Or is there an easy way to bypass this locally? If it's too hacky to avoid the setup, let's keep it like that.

@spaenleh spaenleh force-pushed the 1907-github-oauth-admin branch from 20c6491 to 8606f6b Compare July 4, 2025 06:23
@spaenleh spaenleh requested a review from pyphilia July 4, 2025 07:09
authenticatedAdmin.register(queueDashboardPlugin);
}),
);
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should all those endpoints have a schema?

Comment on lines +23 to +26
// TODO: this tests fails now because passport registration has been moved to inside the core registration and we can not register a route there,
// all top level routes do not use passport.
// move this test closer to matchOne
// other preHandlers are tested in plugin.test.ts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it work? Remove comment?

it('No Whitelist', async () => {
handler.mockImplementation(shouldBeActor(member));
const response = await app.inject({ path: MOCKED_ROUTE });
// console.log(await response.json());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove.

Comment on lines +60 to +71
await app.register(fp(openapiPlugin));
await app.register(fp(schemaRegisterPlugin));

// db should be registered before the dependencies.
await app.register(fp(databasePlugin));

// register some dependencies manually
registerDependencies(app.log);

await app.register(fp(metaPlugin));
// register the core app
app.register(fp(coreApp));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was important to include or not compared to the main app? Add comments.

@spaenleh spaenleh mentioned this pull request Jul 15, 2025
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement OAuth for admin access to queue ui

2 participants