p2-inc / keycloak-magic-link

Magic Link Authentication for Keycloak
Other
217 stars 43 forks source link

Magic link is not showing inside Authenticator section of keycloak admin console #39

Closed syama-aot closed 1 year ago

syama-aot commented 1 year ago

I did copied magic link jar from this repo. https://repo1.maven.org/maven2/io/phasetwo/keycloak/keycloak-magic-link/0.14/. I was able to do the magic link rest API, but I was unable to get that in Authenticator section. Do i need to copy any other jar along with magic link JAR. Thanks in advance

xgp commented 1 year ago

No. That jar should be enough. When you click "Add step" in your authentication flow, it will be in the list:

image

syama-aot commented 1 year ago

I have created a magic link with UPDATE_PASSWORD option (through the magic link API). But it's not working. It's directly logged in. const magicLinkAPIUrl = config.keycloak.authUrl + '/realms/' + config.keycloak. realmName + '/magic-link'; const requestData = { email: email, client_id: config.keycloak.clientId, redirect_uri: 'http://localhost:3001/auth/redirect', expiration_seconds: 3600, force_create: true, // update_profile: true, update_password: true, send_email: false, };

  const headers = {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Authorization: `Bearer ${token}`,
  };

  const response = await axios.post(magicLinkAPIUrl, requestData, {

headers }).catch(err => console.log(err));

On Fri, Jul 7, 2023 at 12:46 PM Garth @.***> wrote:

Closed #39 https://github.com/p2-inc/keycloak-magic-link/issues/39 as completed.

— Reply to this email directly, view it on GitHub https://github.com/p2-inc/keycloak-magic-link/issues/39#event-9751476721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJO3PU2B6XZ5LZ6STPHN4LXO6ZT3ANCNFSM6AAAAAA2BMAEQ4 . You are receiving this because you authored the thread.Message ID: @.***>

xgp commented 1 year ago

Looks like a bug where it only adds the required actions when the user is new. Fix in https://github.com/p2-inc/keycloak-magic-link/pull/40

syama-aot commented 1 year ago

Great! Thank you very much.

On Fri, Jul 7, 2023 at 1:58 PM Garth @.***> wrote:

Closed #39 https://github.com/p2-inc/keycloak-magic-link/issues/39 as completed.

— Reply to this email directly, view it on GitHub https://github.com/p2-inc/keycloak-magic-link/issues/39#event-9752181935, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJO3PWO6TY7QKZHPBY4KETXO7CC7ANCNFSM6AAAAAA2BMAEQ4 . You are receiving this because you authored the thread.Message ID: @.***>