Can you provide a full callback URL sample?

It appears as thought OKTA is accessing my callback URL correctly or at all.
Can someone please provide a sample callback URL with all of the querystring/URL parameters for OIDC authentication so that I can verify that my programming is correct?
I’m looking for something like kind of like:

/authorization-code/callback?key1=value1&key2=value2&key3=value3...

but replace ‘key1’, ‘key2’, ‘key3’ etc with actual key names.

Thanks

The format for the parameters sent to this endpoint will vary based on the OAuth flow you are using and the response_mode used. For example, if you are using Authorization Code Flow, you can find an example for what this redirect looks like in our guide here:

http://www.example.com#code=P5I7mdxxdv13_JfXrCSq&state=state-296bc9a0-a2a2-4a57-be1a-d0e2fd9bb601
1 Like

Hey there @peteletkemanrakuten ,

I’m not sure this answers your question, but you might want to check out the OIDC Debugger to inspect and test the callback URL parameters. If you’re in a Python web app, you’ll also have a client secret, which should give you a high-level idea.

Another option is running the Python Flask Quickstart and debugging it with your config.

Let us know how it goes. I’m not a Python developer, so I probably won’t be able to answer any implementation-specific questions. :sweat_smile:

1 Like

Using the OIDC debug web site I was able to get success with the first step


I need to see how I can complete step 2.
However, I would still like a full example callback URL as the OIDC debug site uses their own and that could very well be where my issues are. With a full sample callback URL I can feed it into Python and work on debugging the problem(s).

So I’ve completed step 2, and:

  • this requires that the redirection url be OpenID Connect debugger, but it works fine
  • the issue that I’m experiencing is that my redirection URL (localhost:8000/authorization-code/callback) is not correct (I think).

I just don’t know what the OKTA server is returning or what the OKTA server is seeing and the logs on the OKTA server say that everything is fine, which seems like a bug to me.

Hey @peteletkemanrakuten,

I’m glad to hear you’re making progress! Thanks for pointing out that the logs may be misleading. I’ll inquire internally about that.

Have you tried running the Python Quickstart project and verifying everything works with the Okta config and setup you have? It would be a better match as the quickstart and your project would be a web application type, so you can better follow all the communication. If everything works with authentication, you can then add code to debug or log the callback URL from Okta to inspect each flow step. Additionally, if desired, you could watch incoming and outgoing network requests.

There may be better ways to approach the problem you’re solving, but taking things apart and shaking them like this on a sample app is how I’d approach things.

Let us know if you figure it out or have an alternative method. I’m sure other developers will have the same question at some point, too, so sharing knowledge is much appreciated!

I’ve actually gotten this working with the Litestar framework.
I plan on taking screenshots and making a tutorial on dev.to in the next few days with a link to the github.com repo for any/all to use.
Working through the Flask project again and running it in parallel helped me out.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.