diff options
author | 2022-12-06 14:15:56 +0100 | |
---|---|---|
committer | 2022-12-06 14:15:56 +0100 | |
commit | 199b685f430910910e43476caa9ccec6a441d020 (patch) | |
tree | b928c97deae38f8194e51b5e7a69766ddd1a0763 /internal/db/user.go | |
parent | [feature] media: add webp support (#1155) (diff) | |
download | gotosocial-199b685f430910910e43476caa9ccec6a441d020.tar.xz |
[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
Diffstat (limited to 'internal/db/user.go')
-rw-r--r-- | internal/db/user.go | 2 |
1 files changed, 2 insertions, 0 deletions
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 |