mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 00:59:40 +02:00
fix(mana-core-auth): use correct property name 'redirectUrls' for Better Auth
Better Auth expects 'redirectUrls' (lowercase 'urls') but schema had 'redirectURLs' (uppercase 'URLs'). This caused the redirect URI validation to fail because Drizzle returned the wrong property name. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d09ea061d2
commit
ee05b6c3ca
2 changed files with 3 additions and 3 deletions
|
|
@ -135,7 +135,7 @@ export const oauthApplications = authSchema.table('oauth_applications', {
|
|||
metadata: text('metadata'),
|
||||
clientId: text('client_id').unique().notNull(),
|
||||
clientSecret: text('client_secret').notNull(),
|
||||
redirectURLs: text('redirect_urls').notNull(), // Comma-separated URLs (Better Auth expects this format, NOT JSON)
|
||||
redirectUrls: text('redirect_urls').notNull(), // Comma-separated URLs (Better Auth expects 'redirectUrls' property name)
|
||||
type: text('type').notNull().default('web'), // web, native, spa
|
||||
disabled: boolean('disabled').default(false).notNull(),
|
||||
userId: text('user_id').references(() => users.id, { onDelete: 'cascade' }),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ async function seed() {
|
|||
.set({
|
||||
clientSecret: synapseClientSecret,
|
||||
// Better Auth expects comma-separated string, NOT JSON array
|
||||
redirectURLs: 'https://matrix.mana.how/_synapse/client/oidc/callback',
|
||||
redirectUrls: 'https://matrix.mana.how/_synapse/client/oidc/callback',
|
||||
updatedAt: new Date(),
|
||||
})
|
||||
.where(eq(oauthApplications.clientId, 'synapse'));
|
||||
|
|
@ -79,7 +79,7 @@ async function seed() {
|
|||
clientId: 'synapse',
|
||||
clientSecret: synapseClientSecret,
|
||||
// Better Auth expects comma-separated string, NOT JSON array
|
||||
redirectURLs: 'https://matrix.mana.how/_synapse/client/oidc/callback',
|
||||
redirectUrls: 'https://matrix.mana.how/_synapse/client/oidc/callback',
|
||||
type: 'web',
|
||||
disabled: false,
|
||||
metadata: JSON.stringify({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue