You can do so with connect.close(); in your onSuccess callback function to close the widget after the successful enrolment; will make this the default behaviour.

Did this answer your question?