Good afternoon! I'm looking at using Okta with the...
# support-questions-legacy
u
Good afternoon! I'm looking at using Okta with the ST Passwordless recipe. I'm using a PKCE flow without a client secret, and getting this error
Please provide the oktaDomain in the additionalConfig of the Okta provider.
. Is this flow detailed somewhere in the docs that I can reference?
r
hey @_thewhit_ can i see the full error stack?
u
@rp_st Thanks for the quick response! Adding the
oidcDiscoveryEndpoint
got me a step further.
Adding the discovery endpoint fixed the issue, but I'm now hitting an issue after I authenticate via Okta and then hit "Call API". I get a
Uncaught runtime error
... I assume the call back to Okta to introspect the token is failing. Any ideas why?
Copy code
INFO:     127.0.0.1:57898 - "OPTIONS /sessioninfo HTTP/1.1" 200 OK
INFO:     127.0.0.1:57900 - "GET /sessioninfo HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
r
Do you have an error stack?
The /sessioninfo endpoint has nothing to do with okta login. It’s just a regular application api call
So essentially, login with okta succeeded
Also, which python framework are you using? I can try and replicate the sessioninfo API call issue
u
Interesting. In the admin dashboard, when I go to view the user, I get a
User could not be found
error message. All dashboard calls return a 200.
Copy code
INFO:     127.0.0.1:62728 - "GET /auth/dashboard/ HTTP/1.1" 200 OK
INFO:     127.0.0.1:62728 - "GET /auth/dashboard/api/search/tags HTTP/1.1" 200 OK
INFO:     127.0.0.1:62728 - "GET /auth/dashboard/api/tenants/list HTTP/1.1" 200 OK
INFO:     127.0.0.1:62728 - "GET /auth/public/dashboard/api/users/count HTTP/1.1" 200 OK
INFO:     127.0.0.1:62728 - "GET /auth/public/dashboard/api/users?limit=10 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62728 - "POST /auth/dashboard/api/analytics HTTP/1.1" 200 OK
INFO:     127.0.0.1:62763 - "GET /auth/dashboard/api/user?userId=/abc123&recipeId=thirdparty HTTP/1.1" 200 OK
INFO:     127.0.0.1:62763 - "GET /auth/dashboard/api/user/metadata?userId=/abc123 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62763 - "GET /auth/dashboard/api/user/sessions?userId=/abc123 HTTP/1.1" 200 OK
INFO:     127.0.0.1:62763 - "GET /auth/dashboard/api/user/email/verify?userId=/abc123 HTTP/1.1" 200 OK
r
oh. You see the user in the list, but when you click on the user, it says user not found?
u
The actual error I get from the session call is
Copy code
File "/supertokens/backend/venv/lib/python3.12/site-packages/starlette/concurrency.py", line 16, in run_until_first_complete
    (done, pending) = await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/.pyenv/versions/3.12.0/lib/python3.12/asyncio/tasks.py", line 451, in wait
    raise TypeError("Passing coroutines is forbidden, use tasks explicitly.")
TypeError: Passing coroutines is forbidden, use tasks explicitly.
/supertokens/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py:-1: RuntimeWarning: coroutine 'StreamingResponse.listen_for_disconnect' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
/supertokens/backend/venv/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py:-1: RuntimeWarning: coroutine 'StreamingResponse.stream_response' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
r
> You see the user in the list, but when you click on the user, it says user not found? Can you open an issue about this please? Specifying the version of the python SDK along with the framework being used?
u
Will do, thanks!
What is the most commonly used SDK?
r
nodeJS. But the issues you faced seem to be strange, since python is also failrly popular and no complaints about these issues yet. But we will check
@mayank can help here.
u
Thanks, where can I submit this as an issue?
u
Perfect. I will note there, but when I switch to nodejs, the admin dashboard loads that previously existing user just fine. πŸ€·β€β™‚οΈ
m
Hey @_thewhit_ is there anything more to the error stack trace? And it seems like you're using FastAPI right?
u
yes FastAPI
r
then it's probably a bug in the python SDK. We will get on it and fix it.
@mayank could you please check the dashboard issue out and fix it?
u
checking again to get the full stack trace
m
Yes, will fix it.
u
r
how are you running the python app?
u
npm run start
r
ah! so it's from our demo app
let me try
u
πŸ™‚
recipe:
thirdpartypasswordless
r
thanks
u
React frontend, python/FastAPI backend
I have it connected to a supertokens-hosted core
r
ok. So it works on my machine
which version of python are you using?
u
3.12
I also tried 3.11
r
right. Im using 3.10
i doubt that 3.11 and 3.12 will have any diff as such
whats really strange is also that the actual auth APIs are working for you. It's just the application example app (/sessioninfo) that's throwing this error
u
Two questions. My backend is Java-- do you have a java SDK?
r
we don't
so you wll have to spin up another process with node / python or golang
i recommend node + aws lambda. That way, you don't have to actively manage a process.
u
And in the use case above where I am using passwordless + okta, should I expect my frontend/client to have an Okta session AND a SuperTokens session?
r
well, that depends on how you want to implement it
i would convert the okta session into a supertokens session and just use that for all my APIs.
But if you don't want to do that, you could have both at the same time, and for your APIs, you could check for supertokens session first, and if that fails, check for okta session
both work
u
perfect. thank you!
r
hey @_thewhit_ one thing we noticed from the logs you posted above is that the userId is
/abc123
. How did you end up with a value like this?
u
I edited the logs to remove some personal data. I removed a real uuid.
7 Views