Display my login page not you default login page

I need to tell okta to use my custom login page instead of the okta default.

How can I say that to Okta?

• I do not wat to modify the okta hosted login page
• I already have a page with the Sign in Widget

How can I tell okta this: each time a secured resource is asked you should not display your default login page, instead of that use my page (http://localhost:8080/mylogin for example)

Thank you for your help guys.

When users go to the protected section of your site, intercept them and redirect to your login page with widget

That is what I want to do, however, I do not know how to tell okta to use my own sign in widget instead of its default login page.

Can you please, give me the know how?

Thanks

I think what @phi1ipp is suggesting is you should implement a conditional in your code. In pseudocode:

If(user_authorized):
    return resource
else:
    redirect(http://localhost:8080/mylogin)

In this scenario you should never be hitting the Okta hosted login screen.

1 Like

Thanx dude.

But how do I say to okta to go to my page. If i hit (in browser) a secured resource then to browser goes to the default login page. How can I say to okta “Go to my own login instead of the default login page”?

If you feel that users going to your Okta-hosted widget is unavoidable, then the only solution I see is adding custom code to the Okta widget - which I know you said in the original post you didn’t want to do. If you change your mind you can try adding something like:

window.location.replace("http://url.com");

If you decide to go this route, please keep in mind if you need to get to your Okta-hosted widget you can still do so at https://{org domain}/login/default.