mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-19 00:18:56 +01:00
Fix: ci error - no token sercret
This commit is contained in:
parent
91d8451ab3
commit
7af3033f8d
@ -19,7 +19,7 @@ class Auth {
|
||||
/**
|
||||
* Inializes all passportjs stragegies and other passportjs ralated initialization.
|
||||
*/
|
||||
initPassportJs() {
|
||||
async initPassportJs() {
|
||||
// Check if we should load the local strategy
|
||||
if (global.ServerSettings.authActiveAuthMethods.includes("local")) {
|
||||
passport.use(new LocalStrategy(this.localAuthCheckUserPw.bind(this)))
|
||||
@ -70,6 +70,10 @@ class Auth {
|
||||
}).bind(this)))
|
||||
}
|
||||
|
||||
if (!global.ServerSettings.tokenSecret) {
|
||||
await this.initTokenSecret()
|
||||
}
|
||||
|
||||
// Load the JwtStrategy (always) -> for bearer token auth
|
||||
passport.use(new JwtStrategy({
|
||||
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
|
||||
|
Loading…
Reference in New Issue
Block a user