micedre/keycloak-mail-whitelisting

Adding this feature to the magic link authentication

cyril36 opened this issue · 0 comments

Hello,

It would be nice to be able to whitelist the domain that will be allowed to use the magic link. I bump into your lib that works perfectly but I would like to know if it would be hard to combine the magic link with this whitelisting domain?
I currently update the source code of magic link to include the following code that will whitelist the domain :

if (!email.endsWith("@gruion.com")) {
              context.challenge(context.form().createForm("view-error.ftl"));
         }
         else{

But it would be great to have magic link working with email domain whitelisting
Would it be hard to "merge" the libraries (magic link and whitelisting domain)?
We can maybe try to collaborate with @stianst.
I have suggested the same to @stianst just in case both of you agreed to collaborate :D
I have opened a ticket to the magic link repo also stianst/keycloak-containers-demo#12 (comment)
I dont have the knowledge to do it myself, but i can help

Best regards,
Cyril