Skip to content

feat: form auth filter#427

Open
pirhoo wants to merge 14 commits intomainfrom
feat/form-auth-filter
Open

feat: form auth filter#427
pirhoo wants to merge 14 commits intomainfrom
feat/form-auth-filter

Conversation

@pirhoo
Copy link
Copy Markdown
Member

@pirhoo pirhoo commented Mar 26, 2026

This PR introduces support for form-based authentication in the login flow. When the server is configured with FormAuthFilter, users are presented with a credential form instead of the default SSO redirect layout.

See ICIJ/datashare#2083

Changes

  • feat: add LoginCardForm presentational component with username/password fields for form-based login
  • feat: add LoginCard component that wraps the login form in a side-by-side card layout (illustration + form panel)
  • feat: add LoginWelcome component that preserves the existing SSO-based login layout
  • refactor: ensure Login view conditionally renders LoginCard or LoginWelcome based on the authFilter config value
  • fix: merge server config before calling loadUser in Core.loadSettings, ensuring authFilter is available even when auth fails during boot
  • fix: make getUserPermissions non-fatal in Core.loadUser, falling back to empty policies on failure
  • fix: correct router guard state key typo in checkUserProjects (foo -> title)
  • fix: read error props from history.state explicitly in the error route
  • fix: use datashare.router instead of vm.$router in main.js ("$router" no longer exists).
  • fix: remove target="_blank" from the logout link in the Error view

Preview

Enregistrement.de.l.ecran.2026-03-26.a.14.55.38.mov

@pirhoo pirhoo requested a review from a team March 26, 2026 15:00
Copy link
Copy Markdown
Contributor

@caro3801 caro3801 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me ! The design is neat
I added a suggestion to improve the error display in the form and improve design consistency by reporting the changes to other design platforms.

<li class="list-inline-item error__container__links__item error__container__links__item--logout">
<a
:href="logoutLink"
target="_blank"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!

v-if="error"
class="login-card-form__error alert alert-danger mb-0"
>
{{ t('login.error') }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of error is expected ? (short? long?)
suggestion: general errors would be better placed at the bottom of the form to avoid inputs to move or maybe, keep a blank space when there are no error so the UI don't move

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only "username or password is invalid" is support so far. I follow your suggestion and move it down!

</template>

<style scoped lang="scss">
.login-card {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thoughs: Login is a special page, it could be interesting to add it in the design system (storybook and figma @Soliine )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants