Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "after identifer input" hooks #4221

Open
3 of 5 tasks
renom opened this issue Nov 25, 2024 · 8 comments
Open
3 of 5 tasks

Add "after identifer input" hooks #4221

renom opened this issue Nov 25, 2024 · 8 comments
Labels
feat New feature or request.

Comments

@renom
Copy link

renom commented Nov 25, 2024

Preflight checklist

Ory Network Project

No response

Describe your problem

It'd be useful to have an extra hook for login, recovery and verification flows.
Currently it's impossible to interrupt a flow if the decision has to be made based on the identity data but before code is sent.

Describe your ideal solution

Add extra hook type for login, recovery and verification flows, that will be triggered after first input of identifier.
The template data of a jsonnet file will provide identity property.

Workarounds or alternatives

-

Version

1.3.0

Additional Context

No response

@renom renom added the feat New feature or request. label Nov 25, 2024
@aeneasr
Copy link
Member

aeneasr commented Feb 11, 2025

You can use interrupting web hooks for this, if I‘m not mistaken. Please feel free to reopen if I am indeed wrong here

@aeneasr aeneasr closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2025
@renom
Copy link
Author

renom commented Feb 12, 2025

The described behavior is tested, so I can't (setting up a hook that's run after an identifier is provided but before a code is sent). I have no permissions to reopen the issue btw.

@aeneasr aeneasr reopened this Feb 13, 2025
@aeneasr
Copy link
Member

aeneasr commented Feb 13, 2025

Is this only for the code method? Or are there other use cases?

@renom
Copy link
Author

renom commented Feb 13, 2025

I can't remember different use cases tbh.
My use case is interrupting the flow before SMS is sent (based on the identity data).
The point is a multi-step flow. I.e. first you input the identifier, then do something else (input a code from SMS), then the flow completes.

@aeneasr
Copy link
Member

aeneasr commented Feb 13, 2025

What exactly do you want to govern? Do you want to show the user some warning or do you want to use a different SMS gatewa or something else?

@renom
Copy link
Author

renom commented Feb 13, 2025

Something like access control. Disallowing logging in with SMS for specific users.

@aeneasr
Copy link
Member

aeneasr commented Feb 13, 2025

I believe you can achieve this today with the following steps:

  1. Implement a custom target for the SMS webhook where you don’t send out emails for specific users
  2. Use a flow interrupting webhook which uses the same logic to show the user an error

@renom
Copy link
Author

renom commented Feb 13, 2025

Yes, but it'll be triggered after an unnecessary SMS was sent (which costs some money).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

3 participants
@aeneasr @renom and others