Hi,
I’m looking to implement Google Social Auth inside a Self-Hosted Sign-In widget and I’m looking at the 2 options :
- IdP Discovery
- Google Social login button (seems to work for now)
The widget will be hosted as a react app but I’m simply testing and finding pros & cons using a SPA application in Okta. For now I have an issue on both solution using SPA :
- For IdP Discovery, I’m getting redirect to Google (standard behavior here) to sign in but right after I’m getting a 404 error from Okta for url :
https://[Tenant-url]/login?fromLogin=true#
this.widget = new OktaSignIn({
baseUrl: this.props.baseUrl,
display: 'popup',
features: {
idpDiscovery: true
},
idpDiscovery: {
requestContext: window.location.href
}
});
And If I get back to my widget the code to get the session doesn’t work :
widget.authClient.session.exists()
.then(function (sessionExists) {
console.log(sessionExists);
if (sessionExists) {
oktaAuth.authClient.token.getWithoutPrompt().then(function (response) {
oktaAuth.authClient.tokenManager.setTokens(response.tokens);
});
}
});
https://[Tenant-okta]/api/v1/sessions/me 404 (Not Found)
But it works in the browser (cookie issue?). I’m using a custom URL to avoid using 3rd party cookies.