How to deny login?

When a user logs in via Sphinx is there a way to prohibit that user logging in using data that is in the inherited TUser?

An event on TSphinxConfig , such as OnLoggingIn(Args, var AllowLogin: boolean) would be useful.

I guess an exception can be raised in OnConfigureToken (which isn't pretty) or I guess a Claim could be set.

I'm just trying to find the best way to handle this.

Indeed, for now, you can raise an exception in OnConfigureToken event. It might not be pretty, but is it causing any issue right now?

In any case, you can file a feature request so we create an event like OnBeforeLogin which could be used.

Thanks. Feature request raised

I have tried this, but the TSphinxLogin has already redirected to the main app by the time the exception is raised, so while you don't get to see the app, you only get a blank screen.

1 Like

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