https://supertokens.com/
Join Discord
How can we allow multiple user roles to access a particular API? In case we want an API to be access...
n

namanchhabra_60978

about 2 years ago
How can we allow multiple user roles to access a particular API? In case we want an API to be accessed by SuperAdmin along with Admin, what needs to be added in the verify_session? @verify_session( # We add the UserRoleClaim's includes validator override_global_claim_validators=lambda global_validators, session, user_context: global_validators + \ [UserRoleClaim.validators.includes("admin")] )
n
r
  • 2
  • 1
  • 30
Hey 👋 I'm trying to authenticate via Google using the ThirdParty recipe. We're using NextJS only ...
c

cheerful_lemur_45830

about 2 years ago
Hey 👋 I'm trying to authenticate via Google using the ThirdParty recipe. We're using NextJS only for the frontend, NestJS for the API, and self-hosted SuperTokens core. The
authorisationUrlGET
request runs successfully but the
signInUpPOST
request receives a 500 in the frontend, and a 401 in the backend. The backend error message is just "Request failed with status code 401". We've successfully used the passwordless recipe with this setup so unsure why Google OAuth is not working. Any ideas?
c
r
  • 2
  • 3
  • 30
Did anyone set up Nuxt 3 + Supertokens? Any thoughts how to stay on SSR? Saw only NextJS in guid...
w

whitekotenok

over 2 years ago
Did anyone set up Nuxt 3 + Supertokens? Any thoughts how to stay on SSR? Saw only NextJS in guides
w
r
  • 2
  • 1
  • 30
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
  • 31
Hi, does supertokens support mechanism for device recognition? example use case: detect when an user...
c

czalez17

over 2 years ago
Hi, does supertokens support mechanism for device recognition? example use case: detect when an user login happens from a different device. If it does, can you please point me to documentation about it?
c
r
  • 2
  • 1
  • 30
Hey, I found a bug in the fetch interceptor in supertokens-website (lib/ts/recipeImplementation.ts) ...
u

urbansson

over 2 years ago
Hey, I found a bug in the fetch interceptor in supertokens-website (lib/ts/recipeImplementation.ts) 172:91 When we make our fetch calls we pass a URL object into it as the typescript definitions suggests. Doing that we get the following error:
js
TypeError: url.clone is not a function
and that makes sense as you do the following
js
typeof url === "string" ? url : (url as Request).clone()
the
URL
object does not have the clone methed defined. We currently solve it be calling toString before passing it to fetch, but breaking the fetch api might make other thirdparty dependencies break. You can try it yourself by doing something like this:
js
fetch(new URL(("https://localhost:3000/index.html"))).then(() => {console.log("fetched")}).catch(err => console.log("err", err))
u
r
p
  • 3
  • 4
  • 30
Hi guys, any idea why when i'm hosting the core myself, even tho my connection string to pgsql is co...
t

TeK

over 2 years ago
Hi guys, any idea why when i'm hosting the core myself, even tho my connection string to pgsql is correct it uses in-memory db ? Is there a way to get more logs when starting up ? I only get :
Loading supertokens config.
Completed config.yaml loading.
Loading storage layer.
Using in memory storage.
Loading supertokens version.yaml file.
Started SuperTokens on localhost:3567 with PID: 15384
t
r
  • 2
  • 18
  • 30
Anywhere that I could find a example of using Vanilla JS to create custom UI?
s

Swiftzerr

over 3 years ago
Anywhere that I could find a example of using Vanilla JS to create custom UI?
s
r
+3
  • 5
  • 98
  • 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
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
Previous414243Next

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