Comments (11)
I found it: somehow the generated .jar
file was broken.
I used GitHub Codespaces and (please don't ask me why) the first time it built and generated files with ca. 39 kb, the second time I build, I got about 47 kb.
But never mind, now its working 👍 Sorry for the noise.
from keycloak-magic-link.
It's not the first time I've heard of something going sideways in Codespaces. Thanks for chasing down the root cause and sharing your findings. Let me know if anything else comes up as you use our extension.
from keycloak-magic-link.
You're right. It should probably be emailOrUsername
from keycloak-magic-link.
You only need the keycloak-magic-link-0.17-SNAPSHOT.jar
. I'm not familiar with the bitnami image, but putting it in the providers directory sounds right. After a successful install, the endpoint should be at https://{keycloak-host}/{relative-path}/realms/{realm}/magic-link
, and there should be an example flow called "Magic Link" available in your Authentication Flows.
from keycloak-magic-link.
Hi, thanks for the quick answer. Yes I tried that url (I'm not using a custom relative path and I'm on the keycloak 22, so no /auth prefix). I also can't find the example flow nor the execution step step in the ui...
Do you think it is an issue with the image?
I believe the providers directory is correct since it complains if there are two .jar files.
from keycloak-magic-link.
I did a quick test with this docker-compose file and it works fine:
version: '3'
services:
keycloak:
image: docker.io/bitnami/keycloak:22.0.1
volumes:
- ${PWD}/target/keycloak-magic-link-0.17-SNAPSHOT.jar:/opt/bitnami/keycloak/providers/keycloak-magic-link.jar
environment:
KEYCLOAK_DATABASE_VENDOR: dev-mem
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
ports:
- 8080:8080
and I see the following on start
2023-08-22 10:03:50,785 WARN [org.keycloak.services] (build-41) KC-SERVICES0047: magic-link (io.phasetwo.keycloak.magic.resources.MagicLinkResourceProviderFactory) is implementing the internal SPI realm-restapi-extension. This SPI is internal and may change without notice
2023-08-22 10:03:50,866 WARN [org.keycloak.services] (build-41) KC-SERVICES0047: ext-magic-form (io.phasetwo.keycloak.magic.auth.MagicLinkAuthenticatorFactory) is implementing the internal SPI authenticator. This SPI is internal and may change without notice
2023-08-22 10:03:50,866 WARN [org.keycloak.services] (build-41) KC-SERVICES0047: ext-email-otp (io.phasetwo.keycloak.magic.auth.EmailOtpAuthenticatorFactory) is implementing the internal SPI authenticator. This SPI is internal and may change without notice
2023-08-22 10:03:51,034 WARN [org.keycloak.services] (build-41) KC-SERVICES0047: ext-magic-link (io.phasetwo.keycloak.magic.auth.token.MagicLinkActionTokenHandlerFactory) is implementing the internal SPI actionTokenHandler. This SPI is internal and may change without notice
and
2023-08-22 10:04:04,998 INFO [io.phasetwo.keycloak.magic.MagicLink] (main) creating built-in auth flow for magic link
from keycloak-magic-link.
I'm sorry, but I still can't get it to work. I believe I'm doing the exact same thing: https://github.com/hrueger/keycloak-magic-link-installation-issue
I run docker compose up -d
and get those container logs:
2023-08-22 13:31:04 keycloak 11:31:04.85
2023-08-22 13:31:04 keycloak 11:31:04.85 Welcome to the Bitnami keycloak container
2023-08-22 13:31:04 keycloak 11:31:04.85 Subscribe to project updates by watching https://github.com/bitnami/containers
2023-08-22 13:31:04 keycloak 11:31:04.86 Submit issues and feature requests at https://github.com/bitnami/containers/issues
2023-08-22 13:31:04 keycloak 11:31:04.86
2023-08-22 13:31:04 keycloak 11:31:04.86 INFO ==> ** Starting keycloak setup **
2023-08-22 13:31:04 keycloak 11:31:04.87 INFO ==> Validating settings in KEYCLOAK_* env vars...
2023-08-22 13:31:04 /opt/bitnami/scripts/libvalidations.sh: line 245: return: : numeric argument required
2023-08-22 13:31:04 keycloak 11:31:04.88 INFO ==> Configuring database settings
2023-08-22 13:31:04 keycloak 11:31:04.89 INFO ==> Enabling statistics
2023-08-22 13:31:04 keycloak 11:31:04.89 INFO ==> Enabling health endpoints
2023-08-22 13:31:04 keycloak 11:31:04.89 INFO ==> Configuring http settings
2023-08-22 13:31:04 keycloak 11:31:04.91 INFO ==> Configuring hostname settings
2023-08-22 13:31:04 keycloak 11:31:04.91 INFO ==> Configuring cache count
2023-08-22 13:31:04 keycloak 11:31:04.92 INFO ==> Configuring log level
2023-08-22 13:31:04 keycloak 11:31:04.92 INFO ==> Configuring proxy
2023-08-22 13:31:04 keycloak 11:31:04.93 INFO ==> ** keycloak setup finished! **
2023-08-22 13:31:04 keycloak 11:31:04.94 INFO ==> ** Starting keycloak **
2023-08-22 13:31:04
2023-08-22 13:31:05 Updating the configuration and installing your custom providers, if any. Please wait.
2023-08-22 13:31:08 2023-08-22 11:31:07,987 WARN [org.keycloak.services] (build-28) KC-SERVICES0047: metrics (org.jboss.aerogear.keycloak.metrics.MetricsEndpointFactory) is implementing the internal SPI realm-restapi-extension. This SPI is internal and may change without notice
2023-08-22 13:31:08 2023-08-22 11:31:08,279 WARN [org.keycloak.services] (build-28) KC-SERVICES0047: metrics-listener (org.jboss.aerogear.keycloak.metrics.MetricsEventListenerFactory) is implementing the internal SPI eventsListener. This SPI is internal and may change without notice
2023-08-22 13:31:12 2023-08-22 11:31:12,614 INFO [io.quarkus.deployment.QuarkusAugmentor] (main) Quarkus augmentation completed in 5895ms
2023-08-22 13:31:14 2023-08-22 11:31:13,657 INFO [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: Base URL: <unset>, Hostname: <request>, Strict HTTPS: false, Path: <request>, Strict BackChannel: false, Admin URL: <unset>, Admin: <request>, Port: -1, Proxied: true
2023-08-22 13:31:14 2023-08-22 11:31:14,904 WARN [io.quarkus.agroal.runtime.DataSources] (main) Datasource <default> enables XA but transaction recovery is not enabled. Please enable transaction recovery by setting quarkus.transaction-manager.enable-recovery=true, otherwise data may be lost if the application is terminated abruptly
2023-08-22 13:31:15 2023-08-22 11:31:15,531 WARN [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2023-08-22 13:31:15 2023-08-22 11:31:15,616 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2023-08-22 13:31:15 2023-08-22 11:31:15,729 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000088: Unable to use any JGroups configuration mechanisms provided in properties {}. Using default JGroups configuration!
2023-08-22 13:31:15 2023-08-22 11:31:15,811 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel `ISPN`
2023-08-22 13:31:15 2023-08-22 11:31:15,813 INFO [org.jgroups.JChannel] (keycloak-cache-init) local_addr: 01ebc1b6-8502-450b-b177-aee676ed80db, name: 9cbd0a9bec25-38310
2023-08-22 13:31:15 2023-08-22 11:31:15,822 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB
2023-08-22 13:31:15 2023-08-22 11:31:15,822 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 20MB, but the OS only allocated 212.99KB
2023-08-22 13:31:15 2023-08-22 11:31:15,823 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the send buffer of socket MulticastSocket was set to 1MB, but the OS only allocated 212.99KB
2023-08-22 13:31:15 2023-08-22 11:31:15,823 WARN [org.jgroups.protocols.UDP] (keycloak-cache-init) JGRP000015: the receive buffer of socket MulticastSocket was set to 25MB, but the OS only allocated 212.99KB
2023-08-22 13:31:15 2023-08-22 11:31:15,839 INFO [org.jgroups.protocols.FD_SOCK2] (keycloak-cache-init) server listening on *.39776
2023-08-22 13:31:15 2023-08-22 11:31:15,879 INFO [org.keycloak.broker.provider.AbstractIdentityProviderMapper] (main) Registering class org.keycloak.broker.provider.mappersync.ConfigSyncEventListener
2023-08-22 13:31:16 2023-08-22 11:31:16,836 INFO [org.keycloak.quarkus.runtime.storage.legacy.liquibase.QuarkusJpaUpdaterProvider] (main) Initializing database schema. Using changelog META-INF/jpa-changelog-master.xml
2023-08-22 13:31:17 2023-08-22 11:31:17,844 INFO [org.jgroups.protocols.pbcast.GMS] (keycloak-cache-init) 9cbd0a9bec25-38310: no members discovered after 2002 ms: creating cluster as coordinator
2023-08-22 13:31:17 2023-08-22 11:31:17,851 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000094: Received new cluster view for channel ISPN: [9cbd0a9bec25-38310|0] (1) [9cbd0a9bec25-38310]
2023-08-22 13:31:17 2023-08-22 11:31:17,865 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000079: Channel `ISPN` local address is `9cbd0a9bec25-38310`, physical addresses are `[172.23.0.2:55312]`
2023-08-22 13:31:18 2023-08-22 11:31:18,549 INFO [org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory] (main) Node name: 9cbd0a9bec25-38310, Site name: null
2023-08-22 13:31:18 2023-08-22 11:31:18,683 INFO [org.keycloak.services] (main) KC-SERVICES0050: Initializing master realm
2023-08-22 13:31:20 2023-08-22 11:31:20,110 INFO [io.quarkus] (main) Keycloak 22.0.1 on JVM (powered by Quarkus 3.2.0.Final) started in 7.409s. Listening on: http://0.0.0.0:8080
2023-08-22 13:31:20 2023-08-22 11:31:20,110 INFO [io.quarkus] (main) Profile dev activated.
2023-08-22 13:31:20 2023-08-22 11:31:20,110 INFO [io.quarkus] (main) Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-mariadb, jdbc-mssql, jdbc-mysql, jdbc-oracle, jdbc-postgresql, keycloak, logging-gelf, micrometer, narayana-jta, reactive-routes, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, vertx]
2023-08-22 13:31:20 2023-08-22 11:31:20,251 INFO [org.keycloak.services] (main) KC-SERVICES0009: Added user 'admin' to realm 'master'
2023-08-22 13:31:20 2023-08-22 11:31:20,253 WARN [org.keycloak.quarkus.runtime.KeycloakMain] (main) Running the server in development mode. DO NOT use this configuration in production.
No mentioning of magic-link or similar. I can't see it in the ui either.
Maybe my .jar
file is just broken?
The only things I changed are ${PWD}/
to ./
since I'm on windows, and the port from 8080
to 8089
.
from keycloak-magic-link.
Yes, there are actually some minor things (let me know if you want a new issue for that):
- I have
Duplicate emails
enabled in Keycloak. Therefore, I can't useemail
as the values are not unique. I was first looking to specify the user via itsid
, but I only found theusername
option in your rest api endpoint. This works fine, though. - I was not able to disable the
update_password
required action, since it is automatically enabled when specifying the username. What is the reason for that? I changed that in a fork for my usecase: f6712c8 - When specifying a non-existing username, I get the following error:
User with email null not found, and forceCreate is off
. This was a bit confusing, since I thought it did not take myusername
field.
However, those are only minor things and I was able to work around them pretty easily. Other than that its working just fine!
from keycloak-magic-link.
2 seems like a bug. I can't remember a reason for forcing update_password
(or update_profile
for that matter). I'll update that.
from keycloak-magic-link.
Cool, thanks!
from keycloak-magic-link.
(Just on my phone, so I can't comment on the commit)
I saw that you also changed the error message I mentioned. Love that. I think it would make sense to show the username at %s
if no email is given? Currently, getEmail
is hardcoded there and it might confuse people cause they think their argument value didn't make it into username
properly. Does that make sense?
from keycloak-magic-link.
Related Issues (20)
- Magic Link + NextAuth with Keycloak as a Provider - nonce mismatch HOT 14
- Building for Bitnami container HOT 3
- keycloak magic link - adding update_password after successful profile submission HOT 4
- Navigating on used magic link occurs login into account HOT 1
- Auto email verification with email OTP HOT 6
- Magic link is not showing inside Authenticator section of keycloak admin console HOT 4
- Magic-Code with Force Create User, etc HOT 10
- Simply copy the jar in the provider in the providers folder of quay.io/keycloak/keycloak:21.1.X image leads to org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] ERROR: jakarta.ws.rs.core.UriInfo HOT 2
- Send OTP codes via API HOT 7
- Prebuilt `.jar` files HOT 3
- Apache Server Authentication and Authorization HOT 6
- Issue regarder required actions update HOT 2
- Magic Link for authentication session continuation HOT 2
- Need help setting up magic link with Grafana HOT 4
- Default group assignment after user creation HOT 1
- NullPointerException in MagicLinkAuthenticator if forceCreate is false HOT 2
- Use in combination with multiple factors HOT 2
- Failed authentication: java.lang.IllegalStateException: Magic links not allowed for master realm HOT 3
- Add force create user to Email OTP and Magic Link Continuation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keycloak-magic-link.