From 1b37944f8b8eccc2afcfb0f603786209a3b7402d Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 3 Mar 2025 16:03:36 +0100 Subject: [feature] Refactor tokens, allow multiple app redirect_uris (#3849) * [feature] Refactor tokens, allow multiple app redirect_uris * move + tweak handlers a bit * return error for unset oauth2.ClientStore funcs * wrap UpdateToken with cache * panic handling * cheeky little time optimization * unlock on error --- internal/typeutils/internaltofrontend.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/typeutils/internaltofrontend.go') diff --git a/internal/typeutils/internaltofrontend.go b/internal/typeutils/internaltofrontend.go index 446fe1954..510b165d1 100644 --- a/internal/typeutils/internaltofrontend.go +++ b/internal/typeutils/internaltofrontend.go @@ -626,10 +626,12 @@ func (c *Converter) AppToAPIAppSensitive(ctx context.Context, a *gtsmodel.Applic ID: a.ID, Name: a.Name, Website: a.Website, - RedirectURI: a.RedirectURI, + RedirectURI: strings.Join(a.RedirectURIs, "\n"), + RedirectURIs: a.RedirectURIs, ClientID: a.ClientID, ClientSecret: a.ClientSecret, VapidKey: vapidKeyPair.Public, + Scopes: strings.Split(a.Scopes, " "), }, nil } -- cgit v1.2.3