From 0daa043f1454cb089841156fa82193450e67e198 Mon Sep 17 00:00:00 2001 From: Denis Arnst Date: Sun, 5 Nov 2023 21:34:28 +0100 Subject: [PATCH] oauth: Customizable OpenID Buttontext and auto-launch --- components/connection/ServerConnectForm.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/connection/ServerConnectForm.vue b/components/connection/ServerConnectForm.vue index 40a6330e..57a8ac93 100644 --- a/components/connection/ServerConnectForm.vue +++ b/components/connection/ServerConnectForm.vue @@ -52,7 +52,7 @@
- Login with OpenId + {{ oauth.buttonText }}
@@ -102,7 +102,8 @@ export default { authMethods: [], oauth: { state: null, - verifier: null + verifier: null, + buttonText: 'Login with OpenID' } } }, @@ -595,6 +596,11 @@ export default { if (this.validateLoginFormResponse(statusData, this.serverConfig.address, protocolProvided)) { this.showAuth = true this.authMethods = statusData.data.authMethods || [] + this.oauth.buttonText = statusData.data.authFormData?.authOpenIDButtonText || 'Login with OpenID' + + if (statusData.data.authFormData?.authOpenIDAutoLaunch) { + this.clickLoginWithOpenId() + } } } catch (error) { this.handleLoginFormError(error)