Skip to content

Commit 8f98dcc

Browse files
committed
Add AuthPlugin integration and update dependencies
1 parent 509330d commit 8f98dcc

4 files changed

Lines changed: 25 additions & 2 deletions

File tree

objectstack.config.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { InMemoryDriver } from '@objectstack/driver-memory';
1111
import CrmApp from './examples/app-crm/objectstack.config';
1212
import TodoApp from './examples/app-todo/objectstack.config';
1313
import BiPlugin from './examples/plugin-bi/objectstack.config';
14+
import { AuthPlugin } from '@objectstack/plugin-auth';
1415

1516
export default defineStack({
1617
manifest: {
@@ -23,6 +24,25 @@ export default defineStack({
2324
plugins: [
2425
new ObjectQLPlugin(),
2526
new DriverPlugin(new InMemoryDriver()),
27+
new AuthPlugin({
28+
secret: 'dev-secret-please-change-in-production-min-32-chars',
29+
baseUrl: 'http://localhost:3000',
30+
// Optional: Enable OAuth providers
31+
// providers: [
32+
// {
33+
// id: 'google',
34+
// clientId: process.env.GOOGLE_CLIENT_ID!,
35+
// clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
36+
// }
37+
// ],
38+
// Optional: Enable advanced features
39+
// plugins: {
40+
// organization: true, // Multi-tenant support
41+
// twoFactor: true, // 2FA
42+
// passkeys: true, // WebAuthn/Passkeys
43+
// magicLink: true, // Passwordless auth
44+
// }
45+
}),
2646
new AppPlugin(CrmApp),
2747
new AppPlugin(TodoApp),
2848
new AppPlugin(BiPlugin),

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"dependencies": {
3939
"@objectstack/driver-memory": "workspace:*",
4040
"@objectstack/objectql": "workspace:*",
41+
"@objectstack/plugin-auth": "workspace:*",
4142
"@objectstack/plugin-hono-server": "workspace:*",
4243
"@objectstack/runtime": "workspace:*",
4344
"@objectstack/spec": "workspace:*",

packages/objectql/src/plugin.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,9 @@ export class ObjectQLPlugin implements Plugin {
5555
}
5656

5757
ctx.registerService('data', this.ql); // ObjectQL implements IDataEngine
58-
ctx.registerService('auth', this.ql);
5958

6059
ctx.logger.info('ObjectQL engine registered as service', {
61-
provides: ['objectql', 'metadata', 'data', 'auth']
60+
provides: ['objectql', 'metadata', 'data']
6261
});
6362

6463
// Register Protocol Implementation

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)