I am using a self hosted widget in aspx page. Since moved into the identity engine
1- added : useInteractionCodeFlow: true, (Require Signup)
after making these changes , the login is not working properly.
Initial appraoch : throws 401 error while trying to get the token
signIn.renderEl({
el: ‘#widget-container’
}, function success(res) {
if (res.status === ‘SUCCESS’) {
debugger;
console.log(‘Do something with this sessionToken’, res.session.token);
} else {
}
Hence instead initial approach for render , made changes like:
There is no sessionToken when using useInteractionCodeFlow in Identity Engine, that’s part of the /authn pipeline from Okta Classic and will never be returned if you enable Interaction Code Flow.
The Link shared is for .net MVC (My application is aspx webforms). I tried to implement the same using webforms but the idxcontext is null in webforms. idxcontext is required to redeem the code using interaction code. Hence unable to get the token.
Q:1
Is there any sample app or link which uses self hosted login in aspx form ( identity engine)
Q:2
The widget is rendered using javascript in aspx page. so do i need to configure the application in okta as SPA (client side) or web application.
Thank you for your time in providing the solution.
I will elaborate my situation
Initially :
const signIn = new OktaSignIn({
baseUrl: '@Configuration["Okta:OktaDomain"]',
});
signIn.renderEl({ el: '#widget' }, (res) => {
var sessionTokenField = $("#hiddenSessionTokenField");
sessionTokenField.val(res.session.token);
var form = sessionTokenField.parent();
form.submit();
}, (err) => {
console.error(err);
});
In this approach I am able to login successfully but the signup option is missing(enrollment is configured)
Since its moved into identity Engine I have added : useInteractionCodeFlow: true (as mentioned in doc) after adding useInteractionCodeFlow: true Signup appeared but the login fails (getting 401 in token endpoint).
Main Objective:
Is there a way to add Signup option in the initial approach (Identity Engine). If we add option : registration = true (deprecated) Signup option is enabled but error happens on loading registration form.