So I’ve added Okta sign-in widget into my Angular app and signing in using Okta’s credentials work (ie: input my username/password in okta’s sign-in widget, and I get redirected to my custom application).
However, I’m struggling to get authentication to work with Google after following this tutorial and using the OpenId Connect setup for the sign-in widget.
When I click on the “Sign In with Google” button, and authenticate with Google, instead of being redirected to my custom application (desired behaviour), I get redirected to https://dev-251753.okta.com/app/UserHome# which shows the error message “You don’t have any apps. Please contact {some email address} for assistance.”. Why am I not being redirected to my custom application (ie:https://localhost:5001/implicit/callback) like how I’m being redirected when I authenticate with Okta?
new OktaSignIn({
baseUrl: 'https://dev-251753.okta.com',
authParams: {
pkce: true
},
idps: [
{type: 'GOOGLE', id: '0oa25cniz0jOV5S8u357'}
],
idpDisplay:"SECONDARY"
});
This is in my app.module.ts
OktaAuthModule.initAuth(issuer: 'https://dev-251753.okta.com/oauth2/default',
redirectUri: 'https://localhost:5001/implicit/callback',
clientId: '0oa2msjld1GMiy5ys357',
pkce: true)