Skip to content

Update the Discord web provider to support server metadata discovery - #2563

Merged
kevinchalet merged 1 commit into
openiddict:devfrom
kevinchalet:discord_discovery
Oct 10, 2026
Merged

kevinchalet merged 1 commit into
openiddict:devfrom
kevinchalet:discord_discovery

Conversation

@kevinchalet

Copy link
Copy Markdown
Member

No description provided.

@StellaAlexis

Copy link
Copy Markdown
Contributor

Thanks for following up on this!
Noticed 1 small issue and created an extra PR for that on top of this one kevinchalet#1

Unrelated I also noticed an issue using the v8 preview stack as it threw a migration error when using Postgres.

42804: column "Resources" cannot be cast automatically to type text[]

The EF Core models now use string[] properties, so the migration runs ALTER COLUMN ... TYPE text[] on columns that currently hold JSON strings. This fails on Postgres when rows exist. The affected columns are Requirements, RedirectUris, PostLogoutRedirectUris and Permissions on applications, Scopes on authorizations and Resources on scopes.

It might be worth a note in the 8.0 migration guide. I worked around it by adding a text[] column, filling it with ARRAY(SELECT jsonb_array_elements_text(col::jsonb)), then dropping the old column and renaming the new one.

Co-Authored-By: Stella  <4118427+StellaAlexis@users.noreply.github.com>
@kevinchalet

kevinchalet commented Oct 10, 2026 •

Copy link
Copy Markdown
Member Author

Thanks for following up on this!
Noticed 1 small issue and created an extra PR for that on top of this one kevinchalet#1

Merged, thanks!

The EF Core models now use string[] properties, so the migration runs ALTER COLUMN ... TYPE text[] on columns that currently hold JSON strings. This fails on Postgres when rows exist. The affected columns are Requirements, RedirectUris, PostLogoutRedirectUris and Permissions on applications, Scopes on authorizations and Resources on scopes.

It might be worth a note in the 8.0 migration guide. I worked around it by adding a text[] column, filling it with ARRAY(SELECT jsonb_array_elements_text(col::jsonb)), then dropping the old column and renaming the new one.

Excellent point, thanks! I'll create a ticket with your remarks so I don't forget to include them in the migration guide 😃

Edit: I'll backport this fix to the 7.x branch and make sure it'll be part of the 7.7.2 release shipping today.

@kevinchalet
kevinchalet merged commit ab23a16 into openiddict:dev Oct 10, 2026
6 checks passed
@kevinchalet
kevinchalet deleted the discord_discovery branch October 10, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants