feat: build openid redirect url dynamically

This commit is contained in:
kolaente 2021-12-05 16:39:49 +01:00 committed by Gitea
parent 770578240a
commit ccaed029f2

View file

@ -97,6 +97,7 @@
</template>
<script>
import {parseURL} from 'ufo'
import {mapState} from 'vuex'
import {HTTPFactory} from '@/http-common'
@ -206,7 +207,9 @@ export default {
},
redirectToProvider(provider) {
redirectToProvider(provider, this.openidConnect.redirectUrl)
const {host, protocol} = parseURL(window.location.href)
const redirectUrl = `${protocol}//${host}/auth/openid/`
redirectToProvider(provider, redirectUrl)
},
},
}