Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on pages login-idp-link-confirm and login-idp-link-email #75

Closed
Ann2827 opened this issue Jan 12, 2022 · 1 comment
Closed

Errors on pages login-idp-link-confirm and login-idp-link-email #75

Ann2827 opened this issue Jan 12, 2022 · 1 comment

Comments

@Ann2827
Copy link
Collaborator

Ann2827 commented Jan 12, 2022

Hi!
It's me again. I have a problem with templates login-idp-link-confirm and login-idp-link-email. She's linked with keys again.

How to reproduce the problem:

  • register mail m@m.ru (via template register.ftl)
  • add to keycloak GitHub identityProvider
  • have a GitHub account with email m@m.ru
  • try logging in by template login.ftl via GitHub

Problems:

  • login-idp-link-confirm.ftl takes a long time to load. As a result , it gives 500.
  • login-idp-link-email.ftl (you can see it after fixing the template login-idp-link-confirm.ftl). It takes a long time to load, but template works

How to fix:
The problem is in .data_model.identityProviderBrokerCtx and .data_model.brokerContext. But .data_model.brokerContext.username is used in login-idp-link-email.ftl. I found all the keys in brokerContext and calculated the keys that break the template: ["contextData", "idpConfig", "idp", "authenticationSession"].

New exceptions for .data_model object:

<#if
    ["contextData", "idpConfig", "idp", "authenticationSession"]?seq_contains(key) &&
    are_same_path(path, ["brokerContext"])
>
        <#continue>
</#if>
<#if key == "identityProviderBrokerCtx" && are_same_path(path, []) ><#continue></#if>
@garronej
Copy link
Collaborator

Hi @Ann2827,
Thank you for the detailed issue, I didn't implement this page, it's from the community.
Unfortunately I have no time to deal with keycloaky issues right now.
I will happily merge your PR though
You deserve to appear in the contributor list!

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

No branches or pull requests

2 participants