<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D50Z00008G7VEtSANOkta Classic EngineIntegrationsAnswered2024-03-25T23:55:20.000Z2017-06-13T19:22:14.000Z2017-06-13T19:22:14.000Z
Redirect URL
We are using okata sign in widget: https://developer.okta.com/code/javascript/okta_sign-in_widget.html

Using the below code it does authenticates fine but when I use the redirect URL throws error:

"403  Access Forbidden"  You dont have permission to access this page. We even tried with google.com as below but still no help. Please provide inputs.

 

 <script type="text/javascript">

        var orgUrl = 'https://mydev.oktapreview.com';

        var redirectUrl = 'www.google.com';

        var OKTA_CLIENT_ID = 'clientid';

        //redirectUri: '{{ base_url }}/oauth2/v1/widget/callback?targetOrigin={{ ngrok_url }}/widget',

 

        var oktaSignIn = new OktaSignIn({baseUrl: orgUrl});

 

        oktaSignIn.renderEl(

          { el: '#okta-login-container' },

          function (res) {

              if (res.status === 'SUCCESS') {

                  debugger;

                  res.session.setCookieAndRedirect(redirectUrl);

              }

          }

        );

    </script>

  • Hey Karan, from the looks of it the issue is that you are attempting to redirect the user to an Url outside of Okta. Try to use a link in Okta for redirect.

    For example try to create a bookmark app for the google page and use the bookmark app`s embed link.

    If the issue presists even with this change then I would suggest to reach out to the developer team for further assistance.
    Expand Post
This question is closed.
Loading
Redirect URL