I am working on reactjs application, I have implemented SSO authentication using Okta. I am also using Facebook and Google for SSO authentication. When I am login using Okta login screen I am landing inside the application successfully. When I am login using Facebook or Google, the URL is getting changed as below but I am not landing inside application I need to click on Sign In button and after clicking on button I am able to enter inside the application.
URL after sign in using Facebook/Google- Not landed inside application.
I’m not sure if you’re using an Okta library but I will just assume you are.
It sounds like the user is only authenticated by the external IDP (Facebook, Google) but the /authorize request is not sent afterwards. (You can confirm by checking the network trace).
From what I have seen, the login flow you’re describing only works with the Okta-hosted signin widget so I would suggest going with this option if you can. Otherwise, you need to figure out how to make an /authorize request after the user is authenticated.
Hi @Shardul, what error are you actually seeing? To help with troubleshooting it may be useful to have a mental model of the flows. My mental model for the flow (assuming you’re using auth code flow) is that this should work something like:
Your app → okta/authorise
okta widget login page → facebook/authorise
facebook login page → okta/callback
okta/authorise → your app
your app → okta/token
logged in
To troubleshoot this (sorry If you’ve already done this) in chrome dev tools, network tab, can you see:
the callback from facebook to okta callback url with a code?
can you see the callback from okta/authorize to your app wtih a code?
can you see the callback from okta/token to your app wtih a token?
breaking down the steps can help you work out where its failing. good luck!
Thank you for your response and suggestion, you provided all details.
Actually I created another post and reframed the question and asked with more details, below is the URL,
I have got the reply on above post and I have got the solution for this problem.
Now instead of hyperlinks I can see proper buttons for Facebook and Google login. Also now it is not 3 Step process. Within 1 step I am able to login into react application.
Now I am using OktaSignInWidget and I did setup according the the configuration mentioned in below URL-