https://supertokens.com/ logo
Docs
Join the conversationJoin Discord
Channels
community
contributing
general
github-activity
info
introductions
new-releases
random
security
support-questions
welcome-0xdelusion
welcome-aj-ya
welcome-aleksandrc
welcome-alpinjs
welcome-amberlamps1
welcome-andrew-rodriguez
welcome-ankit-choudhary
welcome-anthony-stod-custodio
welcome-call-in
welcome-chwalbox
welcome-claybiokiller
welcome-co7e
welcome-cosmoecwsa
welcome-devdag
welcome-dinso
welcome-drebotelho
welcome-elio
welcome-ernest
welcome-foxbarrington
welcome-fromscratch
welcome-galto4ir
welcome-goetzum
welcome-hay-kot
welcome-himanshu-kukreja
welcome-hossambarakat
welcome-ichikawakazuto
welcome-jahir9991
welcome-jamesl
welcome-jerry123424
welcome-john-oliver
welcome-jonas-alexanderson
welcome-jxyz
welcome-kelvinwop
welcome-kraz
welcome-lancekey
welcome-leoo
welcome-lukeacollins
welcome-m-j-mon
welcome-malik-khoja
welcome-marco
welcome-mardadi
welcome-meshguy
welcome-metamorph
welcome-mike-tectu
welcome-mirzok
welcome-mozomig
welcome-naberyou66_
welcome-nacer
welcome-namratha
welcome-naveenkumar
welcome-nightlight
welcome-nischith
welcome-notankit
welcome-olawumi
welcome-pavan-kumar-reddy-n
welcome-pineappaul
welcome-poothebear
welcome-rick
welcome-samuel-qosenergy
welcome-samuelstroschein
welcome-shubhamgoel23
welcome-shubhamkaushal
welcome-sidebar
welcome-surajsli
welcome-suyash_
welcome-syntaxerror
welcome-tauno
welcome-tauno
welcome-tawnoz
welcome-teclali
welcome-tls
welcome-turbosepp
welcome-vikram_shadow
welcome-yann
Powered by Linen
support-questions
  • r

    rp

    08/24/2022, 10:10 AM
    Do not create a session on API failure
  • v

    veritas

    08/24/2022, 2:46 PM
    It looks like SuperToken cookies are exceeding the permitted limit. I'm getting this error: "Set-Cookie header is ignored in response from url: http://localhost:4000/auth/session/refresh. The combined size of the name and value must be less than or equal to 4096 characters."
    r
    1 reply · 2 participants
  • s

    segidev

    08/24/2022, 6:08 PM
    Cookie session don't seem to work for iOS 15 when API is on subdomain. As you can see the signin works and responds with the cookie but the immediate refresh token requests simply fails
  • n

    n1ru4l

    08/25/2022, 10:32 AM
    Is a session key property with the value
    null
    omitted from the token payload?
  • r

    rp

    08/25/2022, 11:27 AM
    Value null in session
  • h

    heatbr

    08/25/2022, 11:58 AM
    Hello, is there a
    client_credentials
    like alternative on login strategy ? I know there is user/password which can be use but I think have property name like clientId clientSecret it would be better. What I want is be able to do machine2machine auth. https://auth0.com/blog/using-m2m-authorization/ this is an example
  • b

    Binouse

    08/25/2022, 2:36 PM
    Hi, I am trying to add an API key to my core docker-compose, should I juste add
    API_KEY: ${SUPERTOKENS_API_KEY}
    to the environment section ?
    r
    1 reply · 2 participants
  • f

    flixoflax

    08/25/2022, 4:21 PM
    Hi, is it possible to trigger sending the email verification mail through the backend sdks?
    r
    1 reply · 2 participants
  • d

    dongiveajack

    08/25/2022, 6:44 PM
    Hi @rp, I have 2 requirements, 1. I have set up super token core and backend integration with SDK, and everything works 🙂 . But, how do I enable the dashboard? 2. Assume if I pass the accessToken as a header instead of setting it in cookie for session verification, is there any function in the sdk that takes accessToken as a string and validates it?
  • l

    Luxaaa

    08/25/2022, 6:57 PM
    Hi, How can I rewrite the Set-Cookie to a custom header using the python SDK? I used this example for node: https://github.com/supertokens/supertokens-auth-react/blob/master/examples/with-localstorage/api-server/index.ts But how can i access the response in python (fastapi)? Here is my code:
    python
    def override_session_functions(oi: RecipeInterface):
        original_create_new_session = oi.create_new_session
        original_refresh_session = oi.refresh_session
        original_get_session = oi.get_session
    
        async def create_new_session(request, user_id, access_token_payload, session_data, user_context):
            session = await original_create_new_session(request, user_id, access_token_payload, session_data, user_context)
            _update_headers_in_request(request)
            return session
    
        async def refresh_session(request, user_context):
            _update_headers_in_request(request)
            session = await original_refresh_session(request, user_context)
            _update_headers_for_response(...) # How to get response to provide it here?
            return session
    
        oi.create_new_session = create_new_session
    
        return oi
  • r

    rp

    08/26/2022, 5:15 AM
    Dashboard and access token custom header
  • r

    rp

    08/26/2022, 5:18 AM
    Accessing response object in python
  • e

    engin

    08/26/2022, 8:00 AM
    Question about sharing sessions across subdomains...
    r
    4 replies · 2 participants
  • a

    Al V

    08/26/2022, 3:50 PM
    How do I trigger the email verification workflow when a new user is created using only the backend SDKs? Currently we have a proxy lambda handling requests but since this handles all request types I don't know when a particular invocation is a sign up or a login or a password reset.
  • l

    Luxaaa

    08/26/2022, 6:24 PM
    Hi, After adding values for expose_headers to my CORS Middleware (Python/fastApi), the login form (React) is not working anymore. After clicking login, the page refreshes but i am still on the auth page. After removing the expose_headers it works fine.
    python
    api = CORSMiddleware(
        app=api,
        allow_origins=[
            "http://localhost:3000"
        ],
        allow_credentials=True,
        allow_methods=["GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"],
        allow_headers=["Content-Type", SUPERTOKENS_HEADER] + get_all_cors_headers(),
        expose_headers=[SUPERTOKENS_HEADER]
    )
    The value for SUPERTOKENS_HEADER is
    x-st-cookie
    but i am still using the default cookie implementaion at this time.
  • r

    rp

    08/26/2022, 7:39 PM
    Expose header issue
  • j

    JustDante

    08/26/2022, 8:14 PM
    Hello, i have a problem. When I log out of one account and then log in into another one, it somehow pushes me to the first account. What could be the problem? Doesn't sign out function revoke the session?
  • a

    Atoyebs

    08/27/2022, 2:27 PM
    NextJS Session Recipe Documentation
    1 reply · 1 participant
  • l

    Luxaaa

    08/27/2022, 7:30 PM
    Hello, I am getting a error after logout. I am using the python sdk with fastapi. This is the error message:
    ...
    File "/home/.../app/venv/lib/python3.9/site-packages/supertokens_python/recipe/session/api/implementation.py", line 46, in signout_post
        session = await api_options.recipe_implementation.get_session(
    TypeError: get_session() got an unexpected keyword argument 'anti_csrf_check'
  • r

    Roy R

    08/27/2022, 7:40 PM
    I know it's a saturday, so maybe eventually when someone is available, I'm a little confused about the React session timeout behavior, which is yielding a white-screen when my user's sessions time out. More in the thread.
    1 reply · 1 participant
  • r

    rp

    08/28/2022, 5:36 AM
    Python get session error
  • n

    Nick White

    08/28/2022, 7:04 AM
    i'm having a bunch of cors issues when following the email password recipes and using https://try.supertokens.com as the connectionURI
    r
    6 replies · 2 participants
  • n

    Nick White

    08/28/2022, 7:04 AM
    not sure if anyone can help or has had the same problems
  • j

    JacobLUC

    08/28/2022, 7:06 AM
    I get the following error when i try to sign up with a user: Error: No SuperTokens core available to queryError: No SuperTokens core available to query Setup: I am self hosting a core, without docker on my mac. (It should be running, i can get the hello message when visiting /hello) The connection to my postgresql is successful (the default supertokens tables have been generated)
  • d

    derptacious

    08/28/2022, 12:23 PM
    Can a SuperToken dev take a look at this and let me know which is the best way to "connect provider" with XenForo and SuperTokens https://xenforo.com/community/resources/th-connected-account-providers.8488/
  • r

    rp

    08/28/2022, 1:16 PM
    XenForo
  • i

    idanh

    08/28/2022, 6:19 PM
    Hey, I'm trying to setup Apollo graphql + Nest.js by following the guide, and I manage to get the session info on a controller using the Auth guard and Session param decorator (from the guide) but not on a resolver. I tried (with inspiration from the graphql integration guide) to use a CanActivate guard and access the session with
    GqlExecutionContext.create(context)
    and also tried injecting the session param to the resolver with
    export const User = createParamDecorator(
      (data: unknown, ctx: ExecutionContext) => {
        const x = GqlExecutionContext.create(ctx);
        const context = x.getContext();
        return context.session;
      },
    );
    with no success and couldn't find any code example that combines graphql + nest
    r
    3 replies · 2 participants
  • e

    engin

    08/29/2022, 2:54 AM
    Hi! Question about redirecting after sign in...
    2 replies · 1 participant
  • b

    Binouse

    08/29/2022, 10:26 AM
    Hello, I have a specific question about UserIdMapping. I use ThirdPartyPasswordless recipe, which means that users can logIn from both of these with the same email. The issue I am facing is that my externalUserId is the same for both of these and my setUserIdMapping is violating the unique constraint "userid_mapping_external_user_id_key. Is there a way to remove this constraint, and is it safe ?
  • n

    n1ru4l

    08/29/2022, 10:54 AM
    I noticed that the Auth0 external id (
    sub
    ) for the google provider was
    google-oauth2|<ID>
    . Now with supertokens I am building this within
    createNewSession
    , for mapping the accounts.
    const externalUserId = user.thirdParty ? `${user.thirdParty.id}|${user.thirdParty.userId}` : null;
    I noticed that
    user.thirdParty.id
    , here is
    google
    and not
    google-oauth2
    . Is it safe for me to simply replace the
    google|
    part with
    google-oauth2
    , is the
    <ID>
    part of the auth0 sub stable?
Powered by Linen
Title
n

n1ru4l

08/29/2022, 10:54 AM
I noticed that the Auth0 external id (
sub
) for the google provider was
google-oauth2|<ID>
. Now with supertokens I am building this within
createNewSession
, for mapping the accounts.
const externalUserId = user.thirdParty ? `${user.thirdParty.id}|${user.thirdParty.userId}` : null;
I noticed that
user.thirdParty.id
, here is
google
and not
google-oauth2
. Is it safe for me to simply replace the
google|
part with
google-oauth2
, is the
<ID>
part of the auth0 sub stable?
View count: 1