Trying to setup the Okta SignIn Widget in javascript to authenticate before redirecting to our GWT application. I get the widget, but only get errors, no login.
With this setup I get CORS errors when loading the page,
var oktaState;
const oktaSignIn = new OktaSignIn({
baseUrl: "https://customDomain/",
redirectUri: '/backtoapplication',
clientId: "0oa2jlaqp1NhdJQiF1d7",
scopes: ['openid', 'profile'],
authParams: {
issuer: "https://customDomain/oauth2/AppID/",
responseType: ['token', 'id_token'],
display: 'page',
clientId: "clientID"
},
useInteractionCodeFlow: true,
flow: 'login',
state: JSON.stringify(oktaState)
});
With these errors in developer tools on Chrome
Failed to load resource: the server responded with a status of 400 (Bad Request)
login:61 Objecterror: "access_denied"error_description: “The requested feature is not enabled in this environment.”[[Prototype]]: Object
For the CORS error I use this setup
var oktaState;
const oktaSignIn = new OktaSignIn({
baseUrl: https://customDomain/,
redirectUri: ‘backtoApplication’,
clientId: “ClientID”,
scopes: [‘openid’, ‘profile’],
authParams: {
issuer: https://customDomain/oauth2/appID/v1/authorize,
responseType: [‘token’, ‘id_token’],
display: ‘page’
},
useInteractionCodeFlow: true,
flow: ‘login’,
state: oktaState
});
And I get the CORS errors on my developer tools. I am trying to get this running locally so I can get the app upgraded to Okta before moving to user testing. Any help is appreciated, Thank you.