My URL successfully takes me to a facebook login, where I log in and all that works. When I get redirected back to my site however, it does not seem like I was authenticated.
In the URL though, I do see a #id_token=(giant long string) and not really sure what that does.
I currently also have a standard Okta custom login from this guide that works perfectly at the moment.
The guide helps you log a user into an OpenID Connect (OIDC) application after logging them in through Facebook. This is why an id_token (for the OIDC application you created) is being returned in your URL.
So three things are happening:
User is redirected to Facebook to log in at their identity provider (session created for user in Facebook)
User logs in on Facebook, is redirected back to Okta (session created for user in Okta)
User is redirected to your OIDC application (via the redirect_uri) (tokens returned to application, to use for application session)
What is your use case? Are you trying to allow these Facebook users to log into your OIDC application or just into Okta?
So my use case is to allow Facebook users to log into my website, and then I’ll check their email against a list on my back-end server later to verify they are part of the org.
I think step 3 is where I have it wrong then, should I be using my issuer URL for my redirect_uri then?
Edit: Ok the above definitely was not the solution. It looks like I need to grab the id_token and insert it somewhere. I tried putting it inside oktaAuth.signInWithRedirect({ id_token });
I don’t think it worked though as it immediately implodes when i try to do that