2023-06-19 23:42:47 +02:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2017-11-23 07:22:33 +01:00
|
|
|
|
2023-08-11 04:46:45 +02:00
|
|
|
package ui // import "miniflux.app/v2/internal/ui"
|
2017-11-23 07:22:33 +01:00
|
|
|
|
|
|
|
import (
|
2020-03-08 03:45:19 +01:00
|
|
|
"context"
|
2021-01-27 14:09:50 +01:00
|
|
|
|
2023-08-11 04:46:45 +02:00
|
|
|
"miniflux.app/v2/internal/config"
|
|
|
|
"miniflux.app/v2/internal/oauth2"
|
2017-11-23 07:22:33 +01:00
|
|
|
)
|
|
|
|
|
2020-03-08 03:45:19 +01:00
|
|
|
func getOAuth2Manager(ctx context.Context) *oauth2.Manager {
|
2017-11-23 07:22:33 +01:00
|
|
|
return oauth2.NewManager(
|
2020-03-08 03:45:19 +01:00
|
|
|
ctx,
|
2019-06-02 03:18:09 +02:00
|
|
|
config.Opts.OAuth2ClientID(),
|
|
|
|
config.Opts.OAuth2ClientSecret(),
|
|
|
|
config.Opts.OAuth2RedirectURL(),
|
2020-03-08 03:45:19 +01:00
|
|
|
config.Opts.OAuth2OidcDiscoveryEndpoint(),
|
2017-11-23 07:22:33 +01:00
|
|
|
)
|
|
|
|
}
|