[feature] Refactor tokens, allow multiple app redirect_uris

This commit is contained in:
tobi 2025-03-03 11:45:45 +01:00
commit 3b1b842890
77 changed files with 860 additions and 554 deletions

View file

@ -20,11 +20,17 @@ package testrig
import (
"context"
"github.com/superseriousbusiness/gotosocial/internal/db"
apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
"github.com/superseriousbusiness/gotosocial/internal/state"
)
// NewTestOauthServer returns an oauth server with the given db
func NewTestOauthServer(db db.DB) oauth.Server {
return oauth.New(context.Background(), db)
func NewTestOauthServer(state *state.State) oauth.Server {
ctx := context.Background()
return oauth.New(
ctx,
state,
apiutil.GetClientScopeHandler(ctx, state),
)
}