• Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login
FusionAuth
  • Home
  • Categories
  • Recent
  • Popular
  • Pricing
  • Contact us
  • Docs
  • Login

webhook problem

Scheduled Pinned Locked Moved
General Discussion
0
3
2.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    richb201
    last edited by 9 Dec 2020, 18:33

    Here is what I am trying. Please let me know if this is a reasonable way to go? I am using passwordless login. When the user gets the email they click on the link and it works fine. Let's say a few hours later they decide to click on the link again. At this point I would like to catch them and send them to my own error page "your login has expired!".

    So I am trying to do this with a webhook by trying to get triggered on user.login.failed. But for some reason it doesn't seem to get to my "login expired" page.

    Under Edit/webhook/settings/webhooks/applications i have set it to just my application.

    Can you tell me a path to debug this problem?

    1 Reply Last reply Reply Quote 0
    • M
      mgetka Power User
      last edited by 10 Dec 2020, 07:47

      There is no way to redirect a user anywhere via webhook. Webhooks requests are made internally by the FA and only FA receives its response.

      Use FreeMarker templates to tailor the default page shown by the FA on such event to your needs. If for some reason it is really necessary to redirect a user somewhere else you can edit the page to initiate the redirect via HTML meta tags or javascript.

      1 Reply Last reply Reply Quote 1
      • D
        dan
        last edited by dan 12 Nov 2020, 14:53 11 Dec 2020, 14:53

        One thing you could do is send them an email with a fresh login link. You could catch the 'login failed' and generate a new magic link (which you could build via the API). Then you'd send them an email with the new magic link.

        You could also make sure you include when the link expires in the subject line of the email.

        More on doing that here: https://fusionauth.io/community/forum/topic/220/can-i-customize-the-passwordless-link-email-subject-with-the-time-the-link-expires

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        1 out of 3
        • First post
          1/3
          Last post