How to redirect user back from Self-enrollment Page

We’re working on integrating DUO’s self-enrollment page into our web application.
We’re calling “preauth” end point as specified here (Duo Auth API | Duo Security) which returns enroll_portal_url.

We were wondering if there’s a programmatic way to know when enrollment process is complete, perhaps a returnUrl passed as query string or a callback.

Hi @halleysj!

Have you looked into using our WebSDK instead of the raw AuthAPI?

The SDK will display the full Duo Prompt to your end-users, allowing you to get the most out of Duo’s features as well as allowing for in-line self-enrollment.

Rather than needing to redirect users back to the authentication page programmatically, the Duo Prompt will stop the user, require them to enroll, and then allow them to pass through to your application.

I hope this helps!