mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-04 02:22:09 +01:00
Openid auth failures redirect to login page with error message.
Remove remaining google oauth server settings
This commit is contained in:
@@ -58,11 +58,6 @@ class ServerSettings {
|
||||
// Active auth methodes
|
||||
this.authActiveAuthMethods = ['local']
|
||||
|
||||
// google-oauth20 settings
|
||||
this.authGoogleOauth20ClientID = null
|
||||
this.authGoogleOauth20ClientSecret = null
|
||||
this.authGoogleOauth20CallbackURL = null
|
||||
|
||||
// openid settings
|
||||
this.authOpenIDIssuerURL = null
|
||||
this.authOpenIDAuthorizationURL = null
|
||||
@@ -118,9 +113,6 @@ class ServerSettings {
|
||||
this.buildNumber = settings.buildNumber || 0 // Added v2.4.5
|
||||
|
||||
this.authActiveAuthMethods = settings.authActiveAuthMethods || ['local']
|
||||
this.authGoogleOauth20ClientID = settings.authGoogleOauth20ClientID || null
|
||||
this.authGoogleOauth20ClientSecret = settings.authGoogleOauth20ClientSecret || null
|
||||
this.authGoogleOauth20CallbackURL = settings.authGoogleOauth20CallbackURL || null
|
||||
|
||||
this.authOpenIDIssuerURL = settings.authOpenIDIssuerURL || null
|
||||
this.authOpenIDAuthorizationURL = settings.authOpenIDAuthorizationURL || null
|
||||
@@ -139,16 +131,6 @@ class ServerSettings {
|
||||
this.authActiveAuthMethods = ['local']
|
||||
}
|
||||
|
||||
// remove uninitialized methods
|
||||
// GoogleOauth20
|
||||
if (this.authActiveAuthMethods.includes('google-oauth20') && (
|
||||
!this.authGoogleOauth20ClientID ||
|
||||
!this.authGoogleOauth20ClientSecret ||
|
||||
!this.authGoogleOauth20CallbackURL
|
||||
)) {
|
||||
this.authActiveAuthMethods.splice(this.authActiveAuthMethods.indexOf('google-oauth20', 0), 1)
|
||||
}
|
||||
|
||||
// remove uninitialized methods
|
||||
// OpenID
|
||||
if (this.authActiveAuthMethods.includes('openid') && (
|
||||
@@ -226,9 +208,6 @@ class ServerSettings {
|
||||
version: this.version,
|
||||
buildNumber: this.buildNumber,
|
||||
authActiveAuthMethods: this.authActiveAuthMethods,
|
||||
authGoogleOauth20ClientID: this.authGoogleOauth20ClientID, // Do not return to client
|
||||
authGoogleOauth20ClientSecret: this.authGoogleOauth20ClientSecret, // Do not return to client
|
||||
authGoogleOauth20CallbackURL: this.authGoogleOauth20CallbackURL,
|
||||
authOpenIDIssuerURL: this.authOpenIDIssuerURL,
|
||||
authOpenIDAuthorizationURL: this.authOpenIDAuthorizationURL,
|
||||
authOpenIDTokenURL: this.authOpenIDTokenURL,
|
||||
@@ -247,8 +226,6 @@ class ServerSettings {
|
||||
toJSONForBrowser() {
|
||||
const json = this.toJSON()
|
||||
delete json.tokenSecret
|
||||
delete json.authGoogleOauth20ClientID
|
||||
delete json.authGoogleOauth20ClientSecret
|
||||
delete json.authOpenIDClientID
|
||||
delete json.authOpenIDClientSecret
|
||||
return json
|
||||
@@ -261,9 +238,6 @@ class ServerSettings {
|
||||
get authenticationSettings() {
|
||||
return {
|
||||
authActiveAuthMethods: this.authActiveAuthMethods,
|
||||
authGoogleOauth20ClientID: this.authGoogleOauth20ClientID, // Do not return to client
|
||||
authGoogleOauth20ClientSecret: this.authGoogleOauth20ClientSecret, // Do not return to client
|
||||
authGoogleOauth20CallbackURL: this.authGoogleOauth20CallbackURL,
|
||||
authOpenIDIssuerURL: this.authOpenIDIssuerURL,
|
||||
authOpenIDAuthorizationURL: this.authOpenIDAuthorizationURL,
|
||||
authOpenIDTokenURL: this.authOpenIDTokenURL,
|
||||
|
||||
Reference in New Issue
Block a user