Rules How to identify Login Strategy

Is anyone already have idea on how to identify login strategy on rules?

thanks in advance

Hi @achiong,

it’s available in context.connectionStrategy in the context object in Rules.
And the connection name used is in context.connection.

When you do a dump of the context object, console.log(JSON.stringify(context)); you an see all its content with the Webtask Realtime Logs (extension), which also come up when you hit the “Debug Rule” button.

2 Likes

nice thanks is this connectionStrategy also available in universal login and in passwordless ?

nice thanks is this connectionStrategy also available in universal login

Note sure what you mean with that. When the user comes to the login page, he hasn’t chosen a connection strategy yet.
So, in case you’re ULP offers both Google, Facebook and Database Connection, at that point that user hasn’t chosen any connection strategy yet, therefore, it’s not yet available.

and in passwordless ?

Yes. If you mean whether passwordless can be identified within a Rule via context.connectionStrategy

If your question refers to the Passwordless Login Template, then the same comment as for the ULP applies.

Thanks @mathiasconradt it helps me identify now which to test . thank you

2 Likes

let us know if you have any other questions @achiong!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.