https://supertokens.com/
Join Discord
Hey everyone, Does anyone know why supertokens tries to read to https://publicsuffix.org/list/public...
m

magicberbere

over 1 year ago
Hey everyone, Does anyone know why supertokens tries to read to https://publicsuffix.org/list/public_suffix_list.dat at startup ? As my backend and supertoken instance are in a private subnet, it throws an error as it cannot directly access the internet
m
r
  • 2
  • 8
  • 10
Hello, I am trying to break my overrides out to be more modular, but I am having trouble typing them...
b

bolg55

over 1 year ago
Hello, I am trying to break my overrides out to be more modular, but I am having trouble typing them.
ts
import { db } from '@db/index';
import { users, profiles } from '@db/schema';

const thirdPartySignInUpOverride =
  (originalImplementation) => async (input) => {
    let response = await originalImplementation.thirdPartySignInUp(input);

    if (response.status === 'OK') {
      let { id, emails } = response.user;
      console.log('USER SIGNED UP', id);
      await db.transaction(async (trx) => {
        await trx.insert(users).values({
          id,
          email: emails[0],
        });
        await trx.insert(profiles).values({
          userId: id,
        });
      });

      // This is the response from the OAuth 2 provider that contains their tokens or user info.
      let providerAccessToken = response.oAuthTokens['access_token'];
      let firstName =
        response.rawUserInfoFromProvider.fromUserInfoAPI!['first_name'];

      if (
        response.createdNewRecipeUser &&
        response.user.loginMethods.length === 1
      ) {
        // TODO: Post sign up logic
      } else {
        // TODO: Post sign in logic
      }
    }
    return response;
  };

export default thirdPartySignInUpOverride;
I am really not sure of what the
originalImplementation
type should be. I have tried creating an interface from ThirdPartyPasswordless recipe, but that didn't work at all. Any ideas? Edit: Found a way to type using RecipeInterface. Not sure if this is documented? I had to search in discord and got lucky
b
r
  • 2
  • 1
  • 10
Hi there! Users metadata update stopped working a while ago so I'm wondering if we're doing things r...
f

florian_lefebvre

over 1 year ago
Hi there! Users metadata update stopped working a while ago so I'm wondering if we're doing things right. Here is our current flow: 1. Login is done on the client side (with the netlify recipe) 2. A user can update a specific metadata. We have a route that calls
updateUserMetadata
, this works 3. Then client-side, we try to refresh the metadata and it does not work:
ts
  const attemptRefreshingSession = await Session.attemptRefreshingSession();
  const sessionExists = await Session.doesSessionExist();
  if (sessionExists) {
    const user_id = await Session.getUserId();
    const accessTokenPayload = await Session.getAccessTokenPayloadSecurely();
accessTokenPayload
contains the same metadata as before. User needs to logout and login again to see the refreshed metadata. What should we do?
json
    "supertokens-node": "^13.1.5",
    "supertokens-web-js": "^0.5.0",
f
r
  • 2
  • 6
  • 10
Hi, I need your help, is there a way in supertoken for Google-One-Tap, for social login?
s

shashank0959

over 1 year ago
Hi, I need your help, is there a way in supertoken for Google-One-Tap, for social login?
s
r
  • 2
  • 9
  • 10
Trying to get an SMS API key for our self hosted service, but I can't find the pricing for SMS alone...
s

SuperEric

over 1 year ago
Trying to get an SMS API key for our self hosted service, but I can't find the pricing for SMS alone or create the 'development' or 'production' envs as described here https://supertokens.com/docs/passwordless/sms-delivery/supertokens-sms-service#1-get-the-sms-api-key Does these apply to self hosted instances? And is it possible to get an SMS api key for self hosted instances?
s
r
  • 2
  • 8
  • 10
So the dashboard revoke session doesn't work with third party logins? Anyone else experiencing this?...
m

matth_na

over 1 year ago
So the dashboard revoke session doesn't work with third party logins? Anyone else experiencing this? EDIT: Manually revoking session in the API works, haven't tested signout yet.
m
r
  • 2
  • 8
  • 10
I'm adding additional formFields to my front end (custom UI on flutter) -- how do I access them on m...
a

andrewbyrley

over 1 year ago
I'm adding additional formFields to my front end (custom UI on flutter) -- how do I access them on my python backend? This page (https://supertokens.com/docs/thirdpartyemailpassword/custom-ui/email-password-login) says: On the backend, the formFields array will be available to you for consumption. -- but where?
a
m
  • 2
  • 14
  • 10
I've got a super weird problem trying to implement Supertokens in a NextJS app for the first time. U...
w

WonderPandaDev

over 1 year ago
I've got a super weird problem trying to implement Supertokens in a NextJS app for the first time. Using a NestJS backend and everything appears to be configured properly but when I try to sign up with Nest it hits my NestJS backend and then returns a 404. If I hit the exact same URL from the failed network request using CURL it works just fine eg:
http://localhost:3000/api/auth/signup/email/exists?email={email}
returns the expected result. If I visit the email exists URL directly in the browser it also prints the expected JSON. For some reason though the fetch that's getting triggered from the Next app always returns 404 🤔 Its not a CORS error... just a 404 as if the endpoint doesn't exist. I can log and see it hitting the supertokens middleware in all cases
w
n
  • 2
  • 4
  • 10
"Hello, I am currently implementing the SuperTokens passwordless recipe in a ReactJS application wi...
m

Manoj G

almost 2 years ago
"Hello, I am currently implementing the SuperTokens passwordless recipe in a ReactJS application with Redux Toolkit. My code, which handles OTP submission, works perfectly in my local development environment. However, when I deploy the same code to my production environment, I encounter the following error: error from otp submit ====== TypeError: Cannot use 'in' operator to search for 'loginMethods' in undefined at l (main.js:2:3254333) at t.normaliseUserResponse (main.js:2:3256743) at Object. (main.js:2:3231054) at main.js:2:3228544 at Object.next (main.js:2:3228649) at a (main.js:2:3227363) import { createCode, resendCode, consumeCode,} from "supertokens-web-js/recipe/passwordless"; i am using above library It's worth noting that my code does not make any reference to 'loginMethods,' and this issue only arises in the production environment. I have compared the configurations between my local and production environments, and they seem consistent. Additionally, I have reviewed the SuperTokens documentation and have not found any references to 'loginMethods' in my code. Could you please assist me in identifying the root cause of this error and provide guidance on how to resolve it? Thank you for your help.
m
r
  • 2
  • 21
  • 10
Getting the following error: Error: please provide exactly one client config or pass clientType or t...
s

simon7000

almost 2 years ago
Getting the following error: Error: please provide exactly one client config or pass clientType or tenantId I am using the latest versions of
supertokens-node supertokens-auth-react supertokens-web-js
. I am trying to add a custom provider. Is clientType for react required? If I provide the clientType I am getting an error that the config for this client type is missing.
s
r
  • 2
  • 13
  • 10
Previous474849Next

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