Hi,
I have an issue when I try to login with Google or Facebook (ok with username/password).
When I login, i’m redirected to /app/UserHome (okta website).
I use okta-signin-widget in my angular app.
this.widget = new OktaSignIn({
baseUrl: 'https://xxx.okta.com',
idps: [
{type: 'Facebook', id: 'xxx'},
{type: 'Google', id: 'xxx'}
],
authParams: {
pkce: true
},
idpDisplay: 'PRIMARY',
registration: {
parseSchema: function(schema, onSuccess, onFailure) {
// handle parseSchema callback
onSuccess(schema);
},
preSubmit: function (postData, onSuccess, onFailure) {
// handle preSubmit callback
console.log(postData);
onSuccess(postData);
},
postSubmit: function (response, onSuccess, onFailure) {
// handle postsubmit callback
console.log(response);
onSuccess(response);
}
},
features: {
registration: true
}
});
this.widget.renderEl({
el: '#okta-signin-container'},
(res) => {
if (res.status === 'SUCCESS') {
console.log(res);
res.session.setCookieAndRedirect('https://localhost:4200/login');
// Hide the widget
this.widget.hide();
}
},
(err) => {
throw err;
}
);
What did i forget to do?
Best regards