From 199b685f430910910e43476caa9ccec6a441d020 Mon Sep 17 00:00:00 2001 From: Dominik Süß Date: Tue, 6 Dec 2022 14:15:56 +0100 Subject: [feature] overhaul the oidc system (#961) * [feature] overhaul the oidc system this allows for more flexible username handling and prevents account takeover using old email addresses * [feature] add migration path for old OIDC users * [feature] nicer error reporting for users * [docs] document the new OIDC flow * [fix] return early on oidc error * [docs]: add comments on the finalization logic --- internal/db/user.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/db/user.go') diff --git a/internal/db/user.go b/internal/db/user.go index 1c6118fce..6987a5e11 100644 --- a/internal/db/user.go +++ b/internal/db/user.go @@ -32,6 +32,8 @@ type User interface { GetUserByAccountID(ctx context.Context, accountID string) (*gtsmodel.User, Error) // GetUserByID returns one user with the given email address, or an error if something goes wrong. GetUserByEmailAddress(ctx context.Context, emailAddress string) (*gtsmodel.User, Error) + // GetUserByExternalID returns one user with the given external id, or an error if something goes wrong. + GetUserByExternalID(ctx context.Context, id string) (*gtsmodel.User, Error) // GetUserByConfirmationToken returns one user by its confirmation token, or an error if something goes wrong. GetUserByConfirmationToken(ctx context.Context, confirmationToken string) (*gtsmodel.User, Error) // PutUser will attempt to place user in the database -- cgit v1.2.3