https://supertokens.com/
Join Discord
Ok I am using this example, to access the user role using the jwtpayload, https://supertokens.com/do...
k

kiesker

over 2 years ago
Ok I am using this example, to access the user role using the jwtpayload, https://supertokens.com/docs/emailpassword/common-customizations/sessions/user-information-front-end. But I run into the error jwtpayload.role is not part of the properties
k
r
  • 2
  • 3
  • 34
Hi, Do I need to add user metadata by hand to the access token as custom claim?
t

trivialkettle

over 2 years ago
Hi, Do I need to add user metadata by hand to the access token as custom claim?
t
r
  • 2
  • 5
  • 34
Hey everyone. I'm trying to connect a Unity (game engine) client app with SuperTokens. Is there any ...
n

nicktgn

over 2 years ago
Hey everyone. I'm trying to connect a Unity (game engine) client app with SuperTokens. Is there any documentation, examples or quick start guides on how to use C# on the frontend to authenticate with SuperTokens ?
n
r
  • 2
  • 14
  • 34
Hey! I'm integrating supertoken on my go-fiber backend but I can't seem to install supertokens when ...
k

keezy2147

over 2 years ago
Hey! I'm integrating supertoken on my go-fiber backend but I can't seem to install supertokens when I run go mod tidy. It always gets stuck at
go: downloading github.com/twilio/twilio-go v0.26.0
go: downloading github.com/golang/protobuf v1.3.2
go: downloading github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
k
s
  • 2
  • 3
  • 34
Hi, can I send SMS using API, to a phone number that is not saved in the SuperTokens user management...
d

der_suchende

over 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
  • 34
`thirdPartySignInAndUp` gives me the following error. CORS configuration should be good as it works ...
m

majskiy

over 2 years ago
thirdPartySignInAndUp
gives me the following error. CORS configuration should be good as it works fine for normal sign in/up with credentials. Any ideas?
m
r
  • 2
  • 10
  • 34
Hi, Anyone know why when I implement the `getUserById` in `nestjs`, it return me ```shell [Nest] 12...
c

clean9326

almost 3 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
  • 34
is there a way to list all users?
v

Vrl

about 3 years ago
is there a way to list all users?
v
r
  • 2
  • 1
  • 34
Hey, I'm trying to setup Apollo graphql + Nest.js by following the guide, and I manage to get the se...
i

idanh

over 3 years ago
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
i
r
+2
  • 4
  • 44
  • 34
hello, I had some question regarding session sharing across subdomains. At the moment im deploying o...
a

abyssalhaze

over 1 year ago
hello, I had some question regarding session sharing across subdomains. At the moment im deploying on running on localhost. I have the main domain localhost:3000/ and a subdomain blog.localhost:3000/. The problem im coming across is that when i access the subdomain it redircts me to the login page to login and even if i do login it redirects me back to the login page. The session returns unauthorized. I looked into session sharing and the sessionTokenFrontendDomain i set to ".localhost" but in the caution section of the documentation it says I should not set it to localhost. I instead have indeed declared on my /etc/hosts file the subdomain for blog.localhost. However the problem persists. Am i missing a step? Also do i keep the sessionTokenFrontendDomain with the mention in the hosts file or i remove it?
a
r
  • 2
  • 24
  • 33
Previous363738Next

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