https://supertokens.com/
Join Discord
Hi, I'm experiencing a problem with the get_user_by_id method from supertokens_python.recipe.thirdpa...
d

dominik_90977

almost 2 years ago
Hi, I'm experiencing a problem with the get_user_by_id method from supertokens_python.recipe.thirdparty.syncio. When I access this API route, I get the error message "Initialisation not done. Did you forget to call Supertokens.init". But the rest of the app is working fine (also with login/ logout etc., acccessing the session). Is there something I need to change for the API view?
@method_decorator(verify_session(), name='dispatch')
class UserIsThirdParty(APIView):

    def get(self, request: HttpRequest):
        session: SessionContainer = request.supertokens

        user_id = session.get_user_id()

        user = get_user_by_id(user_id)
        ...
d
r
  • 2
  • 5
  • 55
Hi, I am trying to integrate Supertokens with echo-labstack. I followed this example https://github....
m

mvilrokx

over 1 year ago
Hi, I am trying to integrate Supertokens with echo-labstack. I followed this example https://github.com/supertokens/supertokens-golang/blob/master/examples/with-labstack-echo/main.go. Echo advocates to return errors from your Handlers, which will then be handled by their HTTP Error Handler (which you can customize). This works fine until I introduce the session.VerifySession in my middleware, as per the example (wrap it to turn it into a echo.MiddlewareFunc). As soon as I use this middleware on my routes, they always return
200
(empty body), no matter how may errors I return from my handlers. As soon as I remove the session.VerifySession echo'fied middleware, I get the actual errors. It seems as if the session.VerifySession middleware is swallowing the echo error and just returning a
200
instead. Anybody any idea what could be causing this?
m
r
  • 2
  • 7
  • 54
KeyError 'access_token' when fetching profile info via Google
j

jaynil_71939

about 2 years ago
Hi Team, We are getting a KeyError 'access_token' on our Flask backend when fetching profile info via Google: supertokens_python/recipe/thirdparty/providers/google.py in get_profile_info at line 58 We think it is likely that the signup API is being called twice and returning a 500 response from Google the second time, which means that the auth_code_response does not have the 'access_token' key, and instead returns the following error: { error: 'invalid_grant', error_description: 'Bad Request' } We have looked at this thread https://discord.com/channels/603466164219281420/1113510798736752692 and its related GH issue (https://github.com/supertokens/supertokens-auth-react/issues/707) but haven't been able to come up with a solution. We also cannot reliably reproduce this error. Could we get some support / should the API be catching this to avoid the KeyError? Thank you in advance!
j
r
+3
  • 5
  • 67
  • 54
Hi there, Do you have a recipe for login with Slack? I am using Flutter frontend and python(FastAPI...
y

yogeshksoni

over 1 year ago
Hi there, Do you have a recipe for login with Slack? I am using Flutter frontend and python(FastAPI) backend.
y
r
  • 2
  • 35
  • 53
Hi, I'm using multi tenants and wanted to share the session accros sub domains. So i referred here;...
z

zafer7929

almost 2 years ago
Hi, I'm using multi tenants and wanted to share the session accros sub domains. So i referred here; https://supertokens.com/docs/emailpassword/common-customizations/sessions/share-sessions-across-sub-domains But the example there uses the prebuilt UI (
supertokens-auth-react
), and i'm using my custom UI (
supertokens-web-js
) How can i accomplish sharing session across domains with the custom UI? Thank you
z
r
b
  • 3
  • 38
  • 53
I've got a super weird problem trying to implement Supertokens in a NextJS app for the first time. U...
w

WonderPandaDev

about 2 years ago
I've got a super weird problem trying to implement Supertokens in a NextJS app for the first time. Using a NestJS backend and everything appears to be configured properly but when I try to sign up with Nest it hits my NestJS backend and then returns a 404. If I hit the exact same URL from the failed network request using CURL it works just fine eg:
http://localhost:3000/api/auth/signup/email/exists?email={email}
returns the expected result. If I visit the email exists URL directly in the browser it also prints the expected JSON. For some reason though the fetch that's getting triggered from the Next app always returns 404 🤔 Its not a CORS error... just a 404 as if the endpoint doesn't exist. I can log and see it hitting the supertokens middleware in all cases
w
n
  • 2
  • 4
  • 53
Is there a way to specify a redirect path after successfully consuming a magic link? I dont see an o...
p

puff6248

over 2 years ago
Is there a way to specify a redirect path after successfully consuming a magic link? I dont see an option in
createMagicLink
method. I also tried appending
?redirectToPath=/path
to the end of the magic link but then the login fails. (500 from
signinup/code/consume
)
p
r
  • 2
  • 11
  • 53
I am running supertoken using self-hosted core. I want to run both my auth server (nestjs) and auth ...
r

rangrik

over 2 years ago
I am running supertoken using self-hosted core. I want to run both my auth server (nestjs) and auth core using docker-compose. The issue is I am not able to pass the connectionURI of the core to the server. my authcore service is named -
authCore
so I tried passing
authCore:3567
but this doesn't work I see following error -
Error: Please provide a valid domain name
    at normaliseURLDomainOrThrowError (/app/node_modules/supertokens-node/lib/build/normalisedURLDo

    at new NormalisedURLDomain (/app/node_modules/supertokens-node/lib/build/normalisedURLDomain.js

    at /app/node_modules/supertokens-node/lib/build/supertokens.js:350:39
    at Array.map (<anonymous>)
    at new SuperTokens (/app/node_modules/supertokens-node/lib/build/supertokens.js:348:24)
    at Function.init (/app/node_modules/supertokens-node/lib/build/supertokens.js:372:36)
    at new SupertokensService (/app/src/auth/supertokens/supertokens.service.ts:15:17)
    at Injector.instantiateClass (/app/node_modules/@nestjs/core/injector/injector.js:358:19)
    at callback (/app/node_modules/@nestjs/core/injector/injector.js:59:45)
    at Injector.resolveConstructorParams (/app/node_modules/@nestjs/core/injector/injector.js:139:2
r
r
  • 2
  • 10
  • 53
Are there any known service problems right now? Authentication on our website has started throwing 5...
t

t_c_k

over 2 years ago
Are there any known service problems right now? Authentication on our website has started throwing 500 and 405 errors. Can't figure out why.
t
r
  • 2
  • 15
  • 53
Hey, there is a way to append ST tables to existing database? I used prisma ORM and im not sure how ...
d

damian_w

about 3 years ago
Hey, there is a way to append ST tables to existing database? I used prisma ORM and im not sure how can i update my migration to append ST tables
d
r
b
  • 3
  • 8
  • 53
Previous151617Next

SuperTokens.com

SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).

Powered by