https://supertokens.com/
Join Discord
Hey, got a question regarding axios interceptors. Since we no longer need to explicitly set intercep...
l

leandergan

almost 3 years ago
Hey, got a question regarding axios interceptors. Since we no longer need to explicitly set interceptors, how can I choose which axios instance the supertokens chould use? (is that possible) (using vue3 and go)
l
r
p
  • 3
  • 15
  • 30
Any reason why CORS would fail with `Access to fetch at 'http://localhost:3000/v1/auth/signin' from ...
n

nickm91.

about 3 years ago
Any reason why CORS would fail with
Access to fetch at 'http://localhost:3000/v1/auth/signin' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
cors:
app.enableCors({
    origin: "http://localhost:4200",
    allowedHeaders: ["content-type", ...supertokens.getAllCORSHeaders()],
    credentials: true,
  });
backend config:
{
  config: {
    appInfo: {
      appName: 'app',
      apiDomain: 'http://localhost:3000',
      websiteDomain: 'http://localhost:4200',
      apiBasePath: '/v1/auth',
      websiteBasePath: '/auth'
    },
    connectionURI: 'http://auth:3567',
    apiKey: 'supersecret'
  }
}
frontend config:
apiBasePath: "/v1/auth"
apiDomain: "http://localhost:3000"
appName: "app"
websiteBasePath: "/auth"
websiteDomain: "http://localhost:4200"
EDIT: using nestjs
n
r
  • 2
  • 9
  • 30
Hey, I'm trying to setup Apollo graphql + Nest.js by following the guide, and I manage to get the se...
i

idanh

about 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
  • 30
hi! can i override how `<EmailPassword.EmailPasswordAuth>` from 'supertokens-auth-react' redirects ...
y

yzs

over 3 years ago
hi! can i override how
<EmailPassword.EmailPasswordAuth>
from 'supertokens-auth-react' redirects to auth? i want to add a query param
y
r
  • 2
  • 16
  • 30
TRY_REFRESH_TOKEN error
a

atoyebs

over 3 years ago
TRY_REFRESH_TOKEN error
a
  • 1
  • 4
  • 30
Using emailPasswordSignUp function returns 500 Internal server error
a

atoyebs

over 3 years ago
Using emailPasswordSignUp function returns 500 Internal server error
a
r
  • 2
  • 10
  • 30
I get error - Please call the supertokens.init function before using SuperTokens even if I call this...
d

Deleted User

over 3 years ago
I get error - Please call the supertokens.init function before using SuperTokens even if I call this function with all required arguments. Does anybody have idea why this would happen?
d
r
  • 2
  • 12
  • 30
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
  • 29
Hi, I was wondering how to create a custom signin/signup UI for a NextJS integration. I am currentl...
m

michael_pxr

over 1 year ago
Hi, I was wondering how to create a custom signin/signup UI for a NextJS integration. I am currently successfully using the pre build UI [1], however I'm not sure how to start creating a custom UI. - Should it be in the same file (
pages/auth/[[...path]].tsx
)? If so, where do I put my components? If not, which file should I use? - The example of the custom email password signin [2] only shows the callback function. Is there an example of building a custom UI in NextJS? - Is there a certain structure to keep in mind such that I can easily later add alternative signin/signup methods? [1]: https://supertokens.com/docs/emailpassword/nextjs/setting-up-frontend [2]: https://supertokens.com/docs/emailpassword/custom-ui/email-password-login
m
r
  • 2
  • 4
  • 29
Hello, i'm having an issue with the integration to NestJs. I'm getting a blank (white) screen when i...
t

TheAnimeSenpai

over 1 year ago
Hello, i'm having an issue with the integration to NestJs. I'm getting a blank (white) screen when i try to load the dashboard... Everything seems to work fine when i call the signup api from postman though... Any ideas please?...
t
r
  • 2
  • 9
  • 29
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