mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add OAuth2 PKCE support
This commit is contained in:
parent
fa1148915e
commit
ff5d391701
12 changed files with 126 additions and 68 deletions
|
@ -6,14 +6,16 @@ package oauth2 // import "miniflux.app/v2/internal/oauth2"
|
|||
import (
|
||||
"context"
|
||||
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
"miniflux.app/v2/internal/model"
|
||||
)
|
||||
|
||||
// Provider is an interface for OAuth2 providers.
|
||||
type Provider interface {
|
||||
GetConfig() *oauth2.Config
|
||||
GetUserExtraKey() string
|
||||
GetRedirectURL(state string) string
|
||||
GetProfile(ctx context.Context, code string) (*Profile, error)
|
||||
GetProfile(ctx context.Context, code, codeVerifier string) (*Profile, error)
|
||||
PopulateUserCreationWithProfileID(user *model.UserCreationRequest, profile *Profile)
|
||||
PopulateUserWithProfileID(user *model.User, profile *Profile)
|
||||
UnsetUserProfileID(user *model.User)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue