Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use back keycloak-js instead of initiate login in the backend for account (26.0)#42682

Merged
ahus1 merged 1 commit intokeycloak:release/26.0from
rmartinc:backport-42035-26.0
Nov 3, 2025
Merged

Use back keycloak-js instead of initiate login in the backend for account (26.0)#42682
ahus1 merged 1 commit intokeycloak:release/26.0from
rmartinc:backport-42035-26.0

Conversation

@rmartinc
Copy link
Contributor

Closes #40463

PR: #42035
Commit: 360ff70
PR branch: backport-42035-26.0
Target branch: https://github.com/keycloak/keycloak/tree/release/26.0

Cherry pick for 26.0.

Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.broker.KcOidcBrokerTest#testReauthenticationBothBrokersWithOTPRequired

Keycloak CI - Java Distribution IT (windows-latest - temurin - 17)

java.lang.AssertionError: Expected LoginConfigTotpPage but was Sign in to provider (https://localhost:8543/auth/realms/provider/login-actions/authenticate?client_id=https%3A%2F%2Flocalhost%3A8543%2Fauth%2Frealms%2Fconsumer&tab_id=OcyhQj77iyQ&client_data=eyJydSI6Imh0dHBzOi8vbG9jYWxob3N0Ojg1NDMvYXV0aC9yZWFsbXMvY29uc3VtZXIvYnJva2VyL2tjLXNhbWwtaWRwL2VuZHBvaW50Iiwicm0iOiJwb3N0Iiwic3QiOiJPRGhHNzVvaGpObFJXVXZsaW8yT0NMb2tCOFR5QkJrajVCSHpKTW9ZMjBVLlh2cVVwbHJPWXJvLmFSNkYyR2NnVHptOGttM0hEZ1RxSVEifQ)
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.keycloak.testsuite.pages.AbstractPage.assertCurrent(AbstractPage.java:47)
	at org.keycloak.testsuite.pages.LogoutSessionsPage.assertCurrent(LogoutSessionsPage.java:36)
...

Report flaky test

Copy link
Contributor

@mposolda mposolda left a comment

Choose a reason for hiding this comment

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

Added one comment inline.

Also not 100% sure if all the messages in messages_en.properties are needed, but don't have issues with including them, so probably fine.

request_not_supported=Request not supported
request_uri_not_supported=Request uri not supported
registration_not_supported=Registration not supported
>>>>>>> 360ff7050c (Use back keycloak-js instead of initiate login in the backend for account (#42035))
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems this line should not be here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Argh! Yes, I didn't remove after solving the conflict. Done!

@mposolda mposolda self-assigned this Sep 17, 2025
@rmartinc
Copy link
Contributor Author

Done both! And yes, the properties were not needed, I didn't detect there were two more that are not needed.

@rmartinc
Copy link
Contributor Author

It seems that is finally not needed. Closing it.

@rmartinc rmartinc closed this Sep 18, 2025
@rmartinc
Copy link
Contributor Author

Re-opening this for 26.0.

@rmartinc rmartinc reopened this Oct 28, 2025
@ahus1 ahus1 enabled auto-merge (squash) October 28, 2025 14:45
@ahus1
Copy link
Member

ahus1 commented Oct 28, 2025

@rmartinc - this is now waiting for a UI maintainer to approve.
@ssilvert - can you please approve?

@rmartinc
Copy link
Contributor Author

Thanks @ahus1! @ssilvert This is the issue we want to also move to 26.0 now we are going to tag a new 26.0.17. The same change is done in 26.2 and 26.4.

const error = props.error;
const errorMessage = getErrorMessage(error);
const networkErrorMessage = getNetworkErrorMessage(error);
console.error(error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's try to keep the console uncluttered. I'd remove this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! But this log is in main and it was there before my changes. It was just added by the cherry-pick. 😄

Copy link
Contributor

@mposolda mposolda Oct 31, 2025

Choose a reason for hiding this comment

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

@ssilvert @rmartinc Not sure how to proceed when there is a review comment for backporting something, which was already merged into main . Do we need to create another issue for main to remove the console.log line from there then?

Comment on lines -51 to -54
if (typeof error === "string") {
return error;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you 100% sure that error will never be a string?

Copy link
Contributor Author

@rmartinc rmartinc Oct 29, 2025

Choose a reason for hiding this comment

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

This error is always the error thrown by keycloak-js here. The keycloak-js always returns an Error for throws. If you want I can maintain the string (no problem with that). In main PR this was clearer, because the error passed here was the Error or the string obtained using another method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ssilvert If you want I can re-add these lines, just to move this forward. I think this PR is needed for 26.0.17.

Copy link
Contributor

Choose a reason for hiding this comment

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

@rmartinc If you are sure it's OK, I'm fine with it.

auto-merge was automatically disabled October 29, 2025 15:26

Head branch was pushed to by a user without write access

@rmartinc rmartinc force-pushed the backport-42035-26.0 branch from ee2740a to c6d51cf Compare October 29, 2025 15:26
@mposolda mposolda assigned ssilvert and unassigned mposolda Oct 31, 2025
@mposolda
Copy link
Contributor

@ssilvert Re-assigning to you since you had some review comments. Feel free to merge whenever this looks OK to you.

@ssilvert @rmartinc Also added inline comment about console.log . Not sure how to proceed as this PR is just backport and that line is already present in main .

@ahus1 ahus1 merged commit ff09872 into keycloak:release/26.0 Nov 3, 2025
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants