I am in Spain, I have supertokens in Ireland serve...
# support-questions-legacy
s
I am in Spain, I have supertokens in Ireland servers and i am in Development Environment (v6.0). My original_emailpassword_sign_in_post call takes 4s on avg Yes, I have good connection. I am using fastapi framework. Why is signing taking so long? is the version? do you have closer servers? is only in dev env? Thanks!
r
hey @santimnv
how long does the hello API from the core take? The issue could also be that the fastapi backend you have is "slow", and not the core on our managed service.
s
Where is that API? you mean the /hello from the db in the docker? I am not using docker. How do i call that? where is it exposed in the python documentation?
r
The core connection url is the domain, and just add the /hello path to it.
And send a get request
s
I get 404, that endpoint does not exists localhost:8000/hello nor localhost:8000/api/hello nor localhost:8000/api/auth/hello
r
You have to use the core connection uri
That’s shown on the supertokens.com dashboard
s
Okey, it is working fine, avg of 120ms
r
Yup.
So you should see why your fastapi backend is slow
s
Okay, ill guess, the strange is it verify sessions fast but login is slow, strange
thank you very much!
I have done more testing This takes +1s async def add_roles_and_permissions_to_session(session: SessionContainer): await session.fetch_and_set_claim(UserRoleClaim) This takes 1.4s await add_role_to_user(auth_id, "admin", ctx) This takes 0.7s async def refresh_access_token_payload(session: Session, id: str, username: str): await session.merge_into_access_token_payload({"id": id, "username": username})
Is there any configuration that can be slowing down this so much? Thanks
r
right, i don't think there is anything in the config. Probably check your network? Calling the hello API on the core takes 120 MS, so these APIs should also take about that much time. Overall the API should be done in ~500 MS max.
s
Okey, thanks, ill guess.
Also, i want to get the callback on my server to const authUrl = await getAuthorisationURLWithQueryParamsAndSetState({ thirdPartyId: "google", // This is where Google should redirect the user back after login or error. // This URL goes on the Google's dashboard as well. frontendRedirectURI: "http://localhost:3000/en/auth/callback/google", }); http://localhost:3000/en/auth/callback/google instead of http://localhost:3000/auth/callback/google I have added it to my google settings, but i still get uri mismatch error
how do i change it from supertokens?
r
you need to make sure that the value of frontendRedirectURI is the same as whats on the google dashboard
s
ok, thanks!
7 Views