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