Skip to content

Conversation

@mklos-kw
Copy link
Member

@mklos-kw mklos-kw commented Aug 20, 2025

Description

Show OTP on /admin-settings:

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

Open tasks:

  • ...

@update-docs
Copy link

update-docs bot commented Aug 20, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@mklos-kw mklos-kw marked this pull request as draft August 20, 2025 10:30
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@LukasHirt
Copy link
Collaborator

There is already a PR in progress for this #12925


// Avoid re-triggering when returning from step-up or when a request is already in-flight for this route
const hasStepupParam = !!to.query.stepup
const hasGlobalStepupFlag = new URLSearchParams(window.location.search).has('stepupAcr')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why use query? Shouldn't this be dependent on capabilities based on the requirements?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, should be mandatory, latest version is mandatory. The query was for sake of easier testing the PoC

name: 'admin-settings-general',
component: General,
beforeEnter: (to, from, next) => {
if (!$ability.can('read-all', 'Setting')) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems this is lost in the new guard?

extraQueryParams: {
acr_values: acr,
prompt: 'login',
max_age: 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the max_age be defined in the auth flow?

const redirectRoute = this.router.resolve(this.userManager.getAndClearPostLoginRedirectUrl())
const postRedirectUrl = this.userManager.getAndClearPostLoginRedirectUrl()
try {
sessionStorage.setItem('oc.postStepupRedirectUrl', postRedirectUrl)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why set it again?

@mklos-kw
Copy link
Member Author

There is already a PR in progress for this #12925

Thanks for heads up, I'll leave the target implementation to #12925 then.
The goal was, for sake of PoC make a sketch and see how backend config works with step-up and then clean up once works.

@mklos-kw mklos-kw closed this Aug 20, 2025
@mklos-kw mklos-kw changed the title feat: [230] poc, /admin-settings OTP feat: [OCISDEV-230] poc, /admin-settings OTP Aug 20, 2025
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.

4 participants