Skip to content

Commit

Permalink
Merge branch 'reauth-oidc-bug' into 'main'
Browse files Browse the repository at this point in the history
Fix OIDC re-auth

See merge request reportcreator/reportcreator!338
  • Loading branch information
MWedl committed Nov 20, 2023
2 parents 11e698a + 817e33b commit 38e9746
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
15 changes: 8 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# Changelog

## TBD
* Prevent migration errors caused by DB queries in license check
* Fix spellcheck returning no results for language=auto
* CVSS 4.0 support
* Allow requiring a specific CVSS version in CVSS fields
* Allow accessing designer assets in Chromium during PDF rendering
* Support validating string fields with RegEx patterns
* Add an API endpoint to retrieve project data with markdown fields rendered to HTML
* Do not send unreferenced images to PDF rendering task to reduce memory usage
* Do not export images that are not referenced in exported data
* Prevent migration errors caused by DB queries in license check
* Fix spellcheck returning no results for language=auto
* Fix markdown preview flappy scroll on typing in markdown editor when images are included
* Add an API endpoint to retrieve project data with markdown fields rendered to HTML
* Support validating string fields with RegEx patterns
* Allow accessing designer assets in Chromium during PDF rendering
* Allow requiring a specific CVSS version in CVSS fields
* CVSS 4.0 support
* Fix OIDC login for re-authentication not working


## v2023.136 - 2023-10-30
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/components/LoginProviderForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<v-card-text>
<v-list>
<v-form v-for="oidcProvider in apiSettings.oidcAuthProviders" :key="oidcProvider.id" @submit.prevent="auth.authProviderLoginBegin(oidcProvider)">
<v-form v-for="oidcProvider in apiSettings.oidcAuthProviders" :key="oidcProvider.id" @submit.prevent="auth.authProviderLoginBegin(oidcProvider, { reauth: props.reauth })">
<v-list-item>
<s-btn :key="oidcProvider.id" type="submit" color="primary" block>
Login with {{ oidcProvider.name }}
Expand All @@ -16,7 +16,7 @@

<slot v-if="apiSettings.remoteUserAuthProvider" name="remote">
<v-list-item>
<s-btn @click="auth.authProviderLoginBegin(apiSettings.remoteUserAuthProvider)" color="primary" block>
<s-btn @click="auth.authProviderLoginBegin(apiSettings.remoteUserAuthProvider, { reauth: props.reauth })" color="primary" block>
Login with {{ apiSettings.remoteUserAuthProvider.name }}
</s-btn>
</v-list-item>
Expand All @@ -37,4 +37,8 @@
<script setup lang="ts">
const apiSettings = useApiSettings();
const auth = useAuth();
const props = defineProps<{
reauth?: boolean;
}>();
</script>
4 changes: 2 additions & 2 deletions frontend/src/pages/login/reauth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/>
</template>
</login-form>
<login-provider-form v-else ref="loginProviderForm">
<login-provider-form v-else ref="loginProviderForm" :reauth="true">
<template #title>Re-Authenticate</template>
<template #local>
<v-list-item>
Expand Down Expand Up @@ -62,7 +62,7 @@ useLazyAsyncData(async () => {
if (defaultAuthProvider?.type === AuthProviderType.LOCAL) {
step.value = Step.LOCAL;
} else if (defaultAuthProvider) {
await auth.authProviderLoginBegin(defaultAuthProvider);
await auth.authProviderLoginBegin(defaultAuthProvider, { reauth: true });
}
}
});
Expand Down

0 comments on commit 38e9746

Please sign in to comment.