https://supertokens.com/
Join Discord
Hi I'm using SuperTokens with NextJS. I am trying to protect a SSR page, so I implemented this code ...
k

kyomster

almost 2 years ago
Hi I'm using SuperTokens with NextJS. I am trying to protect a SSR page, so I implemented this code
const { session, hasToken, hasInvalidClaims } = await getSSRSession();

    if (!session) {
        if (!hasToken) {
            return redirect("/auth");
        }

        if (hasInvalidClaims) {
            return <SessionAuthForNextJS />;
        } else {
            return <TryRefreshComponent />;
        }
    }
But it redirect to /auth and therefore after I am back to the / page instead of the page from with I called redirect. How can I do so that it redirect to the previous page ? Thanks.
k
r
  • 2
  • 5
  • 33
Hello support. I'm tryng to setup the front end sdk for react native on a expo project with react na...
a

alejanky

about 2 years ago
Hello support. I'm tryng to setup the front end sdk for react native on a expo project with react native web. When i try to use the init function. it says that the domain name is invalid but am pretty sure it is and have tested with postman. is there something that im missing or it could be something about the expo and react native web itself that are not compatible. I also tried the web version on it and it seem like it worked. but i dont know if that will be able to work on the andoid and ios side of the app. Ty for you help and if there anything else you need im glad to provide it
a
r
n
  • 3
  • 14
  • 33
Hello, I am facing blocking issue. I need to use the `exposeAccessTokenToFrontendInCookieBasedAut...
w

whatsappxthomas

over 2 years ago
Hello, I am facing blocking issue. I need to use the
exposeAccessTokenToFrontendInCookieBasedAuth: true
to verify a socket connection (as per https://supertokens.com/docs/session/common-customizations/sessions/with-websocket) I get an error that this option is not valid. I guessed it was because I was not using the latest version of the lib
supertokens-node
. Indeed I was using the
13.1.5
. Now that I updated to the
14
, it's working. But now I get an error
The running SuperTokens core version is not compatible with this NodeJS SDK
. I am using the
managed core
and I guess that the core was instantiated with a previous version. As I have no control on the core, how can I solve this?
w
r
  • 2
  • 6
  • 33
NO_EMAIL_GIVEN_BY_PROVIDER issue
c

cbwhite920

over 2 years ago
I'm new to setting up oauth providers and such, and am currently getting back the no email given by provider error from my Azure AD integration. Are there any common gotchas that might cause this type of error? I'm sure it's something simple in my Azure AD app registration that I'm no doing right
c
r
  • 2
  • 18
  • 33
Mkay. This kinda relates to the `Issue` I threw up on GitHub in `supertokens-node`. But this questio...
i

ITEnthusiasm

almost 3 years ago
Mkay. This kinda relates to the
Issue
I threw up on GitHub in
supertokens-node
. But this question is more specific. Is there an existing way to replicate the
/signin
,
/signup
,
/session/refresh
route middleware by hand? (And are those the only middlewares created from
app.use(middlewares())
?)
(Background in Thread)
i
r
  • 2
  • 347
  • 33
I'm using the nextjs started integration and when I have an active user session and I hit the /auth ...
o

oldhack1364

almost 3 years ago
I'm using the nextjs started integration and when I have an active user session and I hit the /auth route I get caught in an endless redirect loop. Everything's been followed exactly as the integration says
o
n
r
  • 3
  • 107
  • 33
Let's say I have two customers, C1 and C2, and we provide some integrations infrastructure to them w...
a

abhisheksachdeva

about 3 years ago
Let's say I have two customers, C1 and C2, and we provide some integrations infrastructure to them where Auth is powered by Supertokens (self-hosted for development purposes). Both customers have a common user, U1. If the user signs in to their products P1 and P2 using google, supertokens will assume that it is the same user as
third_party_user_id
is the same but will create two
sessions
. This might lead to some issues in the future as we will be using user_id for lots of other stuff. 1. Is there any way to consider them as separate users? 2. Should we use separate supertokens instance (cloud or local) for each customer? I guess, you will have something internally to manage multiple clients on the supertokens cloud.
a
r
  • 2
  • 11
  • 33
can any body tell me basic functions in supertokens for react and how to connect it with backend lik...
a

ayush019.

about 3 years ago
can any body tell me basic functions in supertokens for react and how to connect it with backend like a functional app authorization and authentication being given by supertokens learning from documentation is bit hard for me first timers
a
r
  • 2
  • 12
  • 34
Does supertokens sdk(Im using Go) has an option for me to query the third parties api for more infor...
d

Diesel

about 3 years ago
Does supertokens sdk(Im using Go) has an option for me to query the third parties api for more information other than the user's email? like for example getting the user's first and last name from google? Or my only way is to query their API myself with the access token im getting in the server during the signInUp method?
d
r
  • 2
  • 2
  • 33
Hey guys. I had a question about the sendPasswordResetEmail method that we use to send a reset passw...
s

siddhantvarma

over 3 years ago
Hey guys. I had a question about the sendPasswordResetEmail method that we use to send a reset password link to the user. Can someone explain the different options available for how the email is sent? I checked the docs here https://supertokens.com/docs/web-js/modules/recipe_emailpassword.html#RecipeFunctionOptions but it isn't clear to me what the RecipeFunctionOptions object passed to recipe functions represents. Maybe an example of the options object and what it means can be helpful.
s
r
  • 2
  • 3
  • 33
Previous323334Next

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