https://supertokens.com/
Join Discord
Hey guys, which functions would i have to mock out (via jest) to write an integration test for a use...
b

bladerpc

almost 2 years ago
Hey guys, which functions would i have to mock out (via jest) to write an integration test for a user signing in -> to unverified email. I use the SessionAuth component, so some pointers would be great. (This component seems to be the one handling the redirection, but unsure of which functions to mock out from super tokens to make the component believe i'm an unverified logged in user)
b
r
p
  • 3
  • 4
  • 34
Is there a way to specify a redirect path after successfully consuming a magic link? I dont see an o...
p

puff6248

almost 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
  • 34
<@498057949541826571> did you train the chatbot on the discord data?
r

robschilder

over 2 years ago
@rp_st did you train the chatbot on the discord data?
r
r
  • 2
  • 5
  • 34
When i shift my vue frontend to a public domain, I can not login anymore. I get an log error "WebSoc...
d

derbernd

about 2 years ago
When i shift my vue frontend to a public domain, I can not login anymore. I get an log error "WebSocket connection to ... failed". The logs from the backend are okay. In the dashboard a new token is shown, but the frontend did not recieve this. I use vue behinde Traefik with the cors middleware. Do I have to add more options to Traefik?
d
r
  • 2
  • 17
  • 33
Hello, I am facing blocking issue. I need to use the `exposeAccessTokenToFrontendInCookieBasedAut...
w

whatsappxthomas

about 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
Hi, can I send SMS using API, to a phone number that is not saved in the SuperTokens user management...
d

der_suchende

about 2 years ago
Hi, can I send SMS using API, to a phone number that is not saved in the SuperTokens user management database? Thanks
d
r
  • 2
  • 3
  • 33
Hey guys, I have CSRF related question. We are using passwordless auth on our Python Django backend ...
e

execreate

about 3 years ago
Hey guys, I have CSRF related question. We are using passwordless auth on our Python Django backend (we use Django Rest Framework). From Django CSRF settings I have configured the following:
python
CSRF_TRUSTED_ORIGINS=[domain_names]
CSRF_COOKIE_SECURE = True
The issue we are getting is that POST requests we are getting this response:
json
{
    "detail": "CSRF Failed: CSRF token missing."
}
e
r
  • 2
  • 20
  • 33
I'm trying to setup the dashboard. When I run the command to create a new user, it says "Not Found"
d

dhatguy

about 2 years ago
I'm trying to setup the dashboard. When I run the command to create a new user, it says "Not Found"
d
n
  • 2
  • 39
  • 32
Hi, Anyone know why when I implement the `getUserById` in `nestjs`, it return me ```shell [Nest] 12...
c

clean9326

over 2 years ago
Hi, Anyone know why when I implement the
getUserById
in
nestjs
, it return me
shell
[Nest] 1229  - 18/02/2023, 3:49:21 pm   ERROR [ExceptionsHandler] Initialisation not done. Did you forget to call the SuperTokens.init function?
Error: Initialisation not done. Did you forget to call the SuperTokens.init function?
    at Function.getInstanceOrThrowError (/Users/xxx/Desktop/projects/chatgpt-studywithme/chatgpt-studywithme/backend/node_modules/supertokens-node/lib/build/recipe/thirdpartyemailpassword/recipe.js:229:15)
    at Function.getUserById (/Users/bytedance/Desktop/projects/chatgpt-studywithme/chatgpt-studywithme/backend/node_modules/supertokens-node/lib/build/recipe/thirdpartyemailpassword/index.js:82:33)
    at UserController.getUserInfo (/Users/xxx/Desktop/projects/chatgpt-studywithme/chatgpt-studywithme/backend/src/user/user.controller.ts:15:52)
my code is like:
ts
@Controller('user')
export class UserController {
  @Get()
  @UseGuards(new AuthGuard()) // For more information about this guard please read our NestJS guide.
  async getUserInfo(@Session() session: SessionContainer): Promise<User> {
    const userId = session.getUserId();
    // You can learn more about the `User` object over here https://github.com/supertokens/core-driver-interface/wiki
    const userInfo = await ThirdPartyEmailPassword.getUserById(userId);
    //....
    return userInfo;
  }
}
c
r
  • 2
  • 12
  • 32
Hey, i got a little problem after enabling email verification at EmailPassword recipe. ```javascript...
t

TELYA

about 3 years ago
Hey, i got a little problem after enabling email verification at EmailPassword recipe.
javascript
EmailPassword.init({
  emailVerificationFeature: {
    mode: "REQUIRED"
   }
})
I noticed this every time when i signup successfully i received two email verification email instead of one. I started to digging why this is happened and i added the createAndSendCustomEmail option to my backend setup
typescript
EmailPasswordNode.init({
  emailVerificationFeature: {
    createAndSendCustomEmail: async (user, emailVerificationURLWithToken) => {
      console.log(user, emailVerificationURLWithToken);
    }
  }
})
The callback fired 2 times after every successful signup. I assume the root of the problem is with my frontend setup because it is the only one who is calling my backend. Do you have guys any idea what i did wrong ? 😅
t
n
  • 2
  • 19
  • 32
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