https://supertokens.com/
Join Discord
Where Are Extra Fields Stored?
j

jacobthedev

about 1 year ago
Hello again! Another question: [The Adding fields page from the docs](https://supertokens.com/docs/emailpassword/common-customizations/signup-form/adding-fields) says that it's possible to include extra fields on sign-up (such as display name, location, or age), but then at the very end of the page, it says: "SuperTokens does not store custom form fields. You need to store them in your db post user sign up." When the
signUp
function is called in step 1, where does the
name
,
age
, and
country
go when a user signs up? I'm curious because I want to include an optional display name field in my sign-up form. I can implement storing the extra field (associated with either the user's email or ID) in my own database, but I'm confused as to why adding the field to the configuration is necessary since SuperTokens can't store the field. Thanks again in advance!
j
r
  • 2
  • 1
  • 7
Hi. In my nestjs app, i have implemented the auth guard. After a successfull login, at the next reuq...
a

avi.f

about 1 year ago
Hi. In my nestjs app, i have implemented the auth guard. After a successfull login, at the next reuqest, my
response.headersSent
is true and the user get redirected to login. So I guess that the verifySession is failed but i dont have info why it was failed even though the original login was successfull. the err is not set:
await verifySession()(request, response, (res) => {
      err = res;
    });
how can I debug and understand why am i getting redirected to login page? Thanks
a
r
  • 2
  • 32
  • 7
Hey there, is there a way to autostart supertokens on ubuntu? After restart it's not automatic
r

ricardas4658

about 1 year ago
Hey there, is there a way to autostart supertokens on ubuntu? After restart it's not automatic
r
r
d
  • 3
  • 14
  • 7
Hello, we're using Supertokens python sdk in an AWS Lambda + FastAPI and it's working great, but now...
e

edistra

about 1 year ago
Hello, we're using Supertokens python sdk in an AWS Lambda + FastAPI and it's working great, but now we'd like to use some supertokens functions outside of the API, like getting user id by email, or managing roles directly from other backend processes. I've noticed it's possible if the init function is called beforehand, how would you refactor the documentation lambda code example so Supertokens can be used outside of FastAPI implementation ? Is there anything else to consider for such usage ?
e
r
  • 2
  • 6
  • 7
I want to override the SessionAuth's behaviour of checking if the session is present or not and if n...
s

Sekai

about 1 year ago
I want to override the SessionAuth's behaviour of checking if the session is present or not and if not redirect to login page. I know I need to modify the overrideGlobalClaimValidators field but I am having troubles finding documentation on it. I don't know what exactly to put. All I know is the authorization part where it checks the roles.
s
r
  • 2
  • 6
  • 7
hi <@498057949541826571> I test endpoints via postman. For this, I need to refresh tokens at regular...
c

ceylan_89116

about 1 year ago
hi @rp_st I test endpoints via postman. For this, I need to refresh tokens at regular intervals. Is there a token for postman that does not require refresh?
c
r
  • 2
  • 6
  • 7
Hello, I am having issue with API /signinup, it is being called twice, already looked at other discu...
h

hwihwi6108

about 1 year ago
Hello, I am having issue with API /signinup, it is being called twice, already looked at other discussions in here but I still don't know how to prevent I am using SuperTokens Core (Managed) v7.0, front-end I am using React with "supertokens-auth-react": "0.31.5", back-end is ExpressJS with "supertokens-node": "13.6.0"
h
r
  • 2
  • 11
  • 7
Hey, I have a problem wih usiing the passwordless recipe. I am using the python SDK with fastapi in ...
l

Luca

over 1 year ago
Hey, I have a problem wih usiing the passwordless recipe. I am using the python SDK with fastapi in my backend, custom ui (supertokens-web-js) on the frontend and a selfhosted core. All are updated to the latest version. (0.18.7 / 0.9.1 / 7.0). Here be backend config for the passwordless recipe:
python
passwordless.init(passwordless.ContactConfig(
        contact_method='EMAIL'),
        flow_type='USER_INPUT_CODE_AND_MAGIC_LINK',
    )
And this is the rontend config:
ts
import SuperTokens from 'supertokens-web-js';
import Session from 'supertokens-web-js/recipe/session';
import Passwordless from 'supertokens-web-js/recipe/passwordless'

const initSupertokens = () => {
    SuperTokens.init({
        appInfo: {
            apiDomain: process.env.NEXT_PUBLIC_BACKEND_HOST!,
            apiBasePath: "/auth",
            appName: "CM",
        },
        recipeList: [
            Session.init(),
            Passwordless.init({}),
        ],
    });
}

export default initSupertokens
after calling
import { createCode } from "supertokens-web-js/recipe/passwordless";
...
const resp = await createCode({email})
i am getting
res.status = OK
Also my backend loggs:
"POST /auth/signinup/code HTTP/1.1" 200 OK
and returns:
json
{
    "status": "OK",
    "deviceId": "cY1ju3u88Tl7IDYc/JBf3duXTHoTbeAz5ujFr0ThODI=",
    "preAuthSessionId": "2S0TLFvqwGH9jX7KRM-IBnS4oP8nd8e-JkmsB0JnilY",
    "flowType": "USER_INPUT_CODE_AND_MAGIC_LINK"
}
But i am not getting any email. I tested several email addresses.
l
r
  • 2
  • 22
  • 7
Is there a way to pass the redirectToPath url parameter down to the /second-factor route? It is work...
r

robottonyc

over 1 year ago
Is there a way to pass the redirectToPath url parameter down to the /second-factor route? It is working for me with the ThirdayPartyEmail and Passwordless init functions but it gets lost after authenticating and redirecting to /second-factor
r
r
  • 2
  • 5
  • 7
Hey everyone, I'm facing an issue with my Express backend setup along with Supertokens for session ...
s

sammon2412

over 1 year ago
Hey everyone, I'm facing an issue with my Express backend setup along with Supertokens for session management. Here's a snippet of my backend code:
javascript
import express from "express";
import { verifySession } from "supertokens-node/recipe/session/framework/express";
import { SessionRequest } from "supertokens-node/framework/express";

let app = express();

app.post("/like-comment", verifySession(), (req: SessionRequest, res) => {
    let userId = req.session!.getUserId();
    //....
});
I've added
verifySession()
to ensure that only authenticated users can access the
/like-comment
route. However, I'm having trouble accessing this route from the front-end using Axios. I've wrapped my component inside
SessionAuth
so that logged-in users have access, but I keep receiving a 401 error. Could anyone guide me on how to properly access this route from the front-end using Axios and ensure that the user is authenticated? Thanks in advance!
s
r
  • 2
  • 38
  • 7
Previous596061Next

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