https://supertokens.com/
Join Discord
Hi, How can I rewrite the Set-Cookie to a custom header using the python SDK? I used this example fo...
l

Luca

almost 3 years ago
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
l
r
  • 2
  • 4
  • 7
Question about generating a JWT for Firebase
d

dleangen

almost 3 years ago
Question about generating a JWT for Firebase
d
r
  • 2
  • 19
  • 7
Is there documentation for how to create users without them signing up?
a

Al V

almost 3 years ago
Is there documentation for how to create users without them signing up?
a
r
r
  • 3
  • 45
  • 7
I'm wrapping my NextJS app with `ThirdPartyEmailPasswordAuth` from `supertokens-auth-react` to expos...
m

mwill8886

almost 3 years ago
I'm wrapping my NextJS app with
ThirdPartyEmailPasswordAuth
from
supertokens-auth-react
to expose the Supertokens context to the any of the components. When I disable all cookies in my browser the
ThirdPartyEmailPasswordAuth
causes it to fail because there is no localStorage or cookies. Is there a preferred way to gracefully handle the
ThirdPartyEmailPasswordAuth
if cookies are disabled?
m
r
  • 2
  • 1
  • 7
any documentataion regarding how to create user
p

porcx

about 3 years ago
any documentataion regarding how to create user
p
r
  • 2
  • 12
  • 7
Hey! Is it possible to override the internal supertoken redirection function? I am using NextJS and ...
f

flixoflax

about 3 years ago
Hey! Is it possible to override the internal supertoken redirection function? I am using NextJS and emailVerificationMode "REQUIRED". However my frontend is trying to check if the email is verified and redirect accordingly. I guess it uses the window.location.href thingy which is slow and inefficient compared to NextRouter...
f
r
  • 2
  • 159
  • 7
Is there a way to restrict google sign-ins only to a single domain? for organisations or school mail...
s

shivam51

about 3 years ago
Is there a way to restrict google sign-ins only to a single domain? for organisations or school mails. I am using supertoken with NestJs and Vue.
s
r
  • 2
  • 24
  • 7
is there a way to reset user data in Saas, like a restart or some api call? if not, then what data i...
d

david_sun

about 3 years ago
is there a way to reset user data in Saas, like a restart or some api call? if not, then what data is safe to remove in the PostgresDB to be clean slate?
d
r
  • 2
  • 5
  • 7
Hi All! I'm currently trying to implement a custom UI for SuperTokens. I set up API requests for sig...
f

flixoflax

about 3 years ago
Hi All! I'm currently trying to implement a custom UI for SuperTokens. I set up API requests for sign up and sign in. However, I'm unsure how to get the onHandleEvent stuff to work with a custom UI. I'm trying to add a second step to the authentication. On successful signup using the thirdpartyemailpassword recipe, I want to redirect to another screen where I can set a username. Is there any guide to implement a custom ui without loosing features like email verification?
f
n
+2
  • 4
  • 86
  • 7
``` async function doesSessionExist() { if (await SuperTokens.doesSessionExist()) { // use...
d

dhatguy

about 3 years ago
async function doesSessionExist() {
    if (await SuperTokens.doesSessionExist()) {
      // user is logged in
      console.log("there is a session");
    } else {
      // user has not logged in yet
    }
  }
this returns error in react native
d
r
n
  • 3
  • 36
  • 7
Previous717273Next

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