-
Notifications
You must be signed in to change notification settings - Fork 0
Replace drizzle-orm with native ObjectQL implementation using better-auth naming conventions #582
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
Changes from all commits
76a7625
2ea215b
e17abf0
1cddee4
6080f06
d746197
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,8 +67,17 @@ export class AuthPlugin implements Plugin { | |
| throw new Error('AuthPlugin: secret is required'); | ||
| } | ||
|
|
||
| // Initialize auth manager | ||
| this.authManager = new AuthManager(this.options); | ||
| // Get data engine service for database operations | ||
| const dataEngine = ctx.getService<any>('data'); | ||
| if (!dataEngine) { | ||
| ctx.logger.warn('No data engine service found - auth will use in-memory storage'); | ||
| } | ||
|
|
||
| // Initialize auth manager with data engine | ||
| this.authManager = new AuthManager({ | ||
| ...this.options, | ||
| dataEngine, | ||
| }); | ||
|
Comment on lines
+70
to
+80
|
||
|
|
||
| // Register auth service | ||
| ctx.registerService('auth', this.authManager); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx.getService('data')throws when the service is not registered (KernelBase.getService throws on missing services), so this init path will crash instead of falling back to in-memory as the log message suggests. Wrap the lookup in try/catch (or use a non-throwing service existence check) and only warn when the service is absent.