It works fine, but I actually want to enter directly to the registration form that is also available in this widget. The design I planned is a screen with two buttons (login and registration). The login button leads the user to the Sign In screen and I want the registration button to work as the login button but with the Sign Up case. Since the widget has it done, but with an anchor at the bottom of the login form I thought it would be also possible to access directly to the registration form when clicking the button on the app.
One of the more common solutions I’ve heard of is to emulate the user clicking this button so the registration view is shown instead. See some example code for what this looks like below (note that the class name may vary depending on the widget version being used):
// Render the Okta Sign-In Widget
var oktaSignIn = new OktaSignIn(config);
oktaSignIn.on('afterRender', function (data) {
// This is the code that makes it look as if the Okta Sign-In Widget has been loaded to the "Registration" view
const view = data.controller;
if(view == 'primary-auth') {
if(registrationNotClicked) {
registrationNotClicked = false;
document.getElementsByClassName("registration-link")[0].click();
}
Thanks for answering. After many days looking for a solution I think this is the only way to get it. I’ll be looking for this feature in the next updates of the Widget.