mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-31 15:47:13 +02:00
oauth: Customizable OpenID Buttontext and auto-launch
This commit is contained in:
@@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div v-if="isLocalAuthEnabled && isOpenIDAuthEnabled" class="w-full h-px bg-white bg-opacity-10 my-2" />
|
<div v-if="isLocalAuthEnabled && isOpenIDAuthEnabled" class="w-full h-px bg-white bg-opacity-10 my-2" />
|
||||||
<ui-btn v-if="isOpenIDAuthEnabled" :disabled="processing" class="mt-1 h-10" @click="clickLoginWithOpenId">Login with OpenId</ui-btn>
|
<ui-btn v-if="isOpenIDAuthEnabled" :disabled="processing" class="mt-1 h-10" @click="clickLoginWithOpenId">{{ oauth.buttonText }}</ui-btn>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -102,7 +102,8 @@ export default {
|
|||||||
authMethods: [],
|
authMethods: [],
|
||||||
oauth: {
|
oauth: {
|
||||||
state: null,
|
state: null,
|
||||||
verifier: null
|
verifier: null,
|
||||||
|
buttonText: 'Login with OpenID'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -595,6 +596,11 @@ export default {
|
|||||||
if (this.validateLoginFormResponse(statusData, this.serverConfig.address, protocolProvided)) {
|
if (this.validateLoginFormResponse(statusData, this.serverConfig.address, protocolProvided)) {
|
||||||
this.showAuth = true
|
this.showAuth = true
|
||||||
this.authMethods = statusData.data.authMethods || []
|
this.authMethods = statusData.data.authMethods || []
|
||||||
|
this.oauth.buttonText = statusData.data.authFormData?.authOpenIDButtonText || 'Login with OpenID'
|
||||||
|
|
||||||
|
if (statusData.data.authFormData?.authOpenIDAutoLaunch) {
|
||||||
|
this.clickLoginWithOpenId()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.handleLoginFormError(error)
|
this.handleLoginFormError(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user