p2-inc / keycloak-magic-link

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

Rep is null on POST to magic-link #80

Closed zaneGittins closed 4 weeks ago

zaneGittins commented 4 weeks ago

Anyone seen this error before when making a POST request to magic-link?

[org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-7) Uncaught server error: java.lang.NullPointerException: Cannot invoke "io.phasetwo.keycloak.magic.representation.MagicLinkRequest.getClientId()" because "rep" is null

I'm using Keycloak 24.0.4 and keycloak-magic-link-0.26, the redirect_uri and client_id are valid, and I have the manage-users role.

xgp commented 4 weeks ago

Post your full request. rep is the JSON body you're posting to the endpoint. That error is telling you that there is no body.

zaneGittins commented 4 weeks ago

Got it working, apologies for this issue - there was a bad character.