I have set up an angular app running on http://localhost:4200
on my local server. I am using Okta-signin-widget as authentication.
When submitting the login form I get the following error in console:
error.errorCode: invalid_request, error.description: The 'redirect_uri' parameter
must be an absolute URI that is whitelisted in the client app settings.
I googled but what I found was adding http://localhost:4200
to the API>Trusted Origins
in the Okta's Developer Console, but that did not help (it was already defined).
I have the following in my Okta applicaiton setting:
Login redirect URIs: http://localhost:4200/implicit/callback
http://localhost:4200/urlform
and defined the redirect URI in the angular login code like this:
this.widget.renderEl({
el: '#okta-signin-container'},
(res) => {
if (res.status === 'SUCCESS') {
this.signIn.loginRedirect('http://localhost:4200/urlform', { sessionToken: res.session.token });
// Hide the widget
this.widget.remove();
}
},
(err) => {
throw err;
}
);
But same problem. I am not sure if I am working on the right page.
Any ideas is highly appreciated.